/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@700&display=swap');

/* Reset default browser styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    color: #333;
}

/* Header styles */
header {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.welcome-title {
    flex: 1;
    text-align: center;
    font-size: 24px;
    font-family: 'Caveat', cursive;
    color: #ffeb3b;
}

.auth-buttons {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

/* Buttons */
a.button {
    display: inline-block;
    margin: 10px 0;
    padding: 10px 20px;
    background-color: lightgreen;
    color: black;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

a.button:hover {
    background-color: #32cd32;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.edit-button {
    background-color: lightgreen;
    padding: 5px 10px;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.edit-button:hover {
    background-color: #32cd32;
}

.cancel-button {
    background-color: grey;
    padding: 5px 10px;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    display: inline-block;
    margin-top: 10px;
    text-align: center;
}

.cancel-button:hover {
    background-color: darkgrey;
}

/* Search and Sort container */
.search-sort-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px;
    gap: 10px;
}

.search-sort-container input[type="text"] {
    flex: 1;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Main container */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Headings */
h1 {
    margin: 0;
    color: #007bff;
}

/* Domain list styles */
.domain-list {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.domain-item {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 300px;
}

.domain-item:hover {
    transform: scale(1.05);
}

.icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #e0e0e0;
    overflow: hidden;
    margin-bottom: 10px;
}

.domain-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.domain-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.domain-item h3 {
    margin: 10px 0;
    color: #007bff;
    font-family: Arial, sans-serif;
    text-align: center;
}

.domain-item p {
    color: #666;
    font-family: Arial, sans-serif;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-buttons {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 10px;
}

.delete-button {
    background-color: red;
    padding: 5px 10px;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

/* Add Domain styles */
.add-domain a {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.add-domain img {
    width: 50%;
    height: 50%;
}

.add-domain h3 {
    margin-top: 10px;
    color: #007bff;
}

/* Form styles */
form {
    max-width: 500px;
    margin: 50px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

form h2 {
    margin-bottom: 20px;
    color: #007bff;
}

form label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

form input[type="text"],
form input[type="password"],
form input[type="file"],
form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

form button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    border: none;
    color: white;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

form button:hover {
    background-color: #0056b3;
}

/* No data message */
.no-data {
    text-align: center;
    font-size: 18px;
    color: #666;
}

/* Responsive design */
@media (max-width: 1200px) {
    .domain-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .domain-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .domain-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .icon-wrapper {
        width: 60px;
        height: 60px;
    }

    .add-domain img {
        width: 40%;
        height: 40%;
    }
}
