/* ------------------------- */
/* ----- Global Styles ----- */
/* ------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Tektur:wght@400..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

@font-face {
    font-family: 'Sigher';
    src: url('media/Sigher.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

body { 
    margin: 0; background: #111;
    font-family: 'Tektur', sans-serif;
}

h2 {
    font-size: 2rem;
}

p {
    font-size: 1.2rem;
}

button:hover {
    cursor: pointer;
}

/* --------------------- */
/* --- Toast Message --- */
/* --------------------- */

#toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: white;
    padding: 1rem 2rem;
    border-radius: 999px;
    font-weight: 500;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#toast.show {
    transform: translateX(-50%) translateY(0);
}


/* -------------------------- */
/* ----- Gallery Styles ----- */
/* -------------------------- */

#gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(425px, 1fr));
    gap: 2rem;
    padding: 3rem;
    padding-top: 4.5rem;
}

#gallery img {
    width: 100%;
    object-fit: cover;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    #gallery {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }
}

/* --------------------------- */
/* ----- Floating Styles ----- */
/* --------------------------- */

.floating {
    position: -webkit-fixed;
    position: fixed;
    display: flex;
    bottom: 10px;
    right: 10px;
    z-index: 1;
}

.floating button {
    border: none;
    border-radius: 100%;
    aspect-ratio: 1;
    cursor: pointer;
    width: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.25rem;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .floating {
        bottom: 20px;
        right: 20px;
    }

    .floating button {
        width: 64px;
    }

    .floating button img {
        width: 32px;
        height: 32px;
    }
}

/* ------------------------- */
/* ----- Filter Styles ----- */
/* ------------------------- */

.filters-menu {
    display: flex;
    position: fixed;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    top: 5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.4);
}

/* ------------------------ */
/* ----- Modal Styles ----- */
/* ------------------------ */

.modal {
    display: none;
    position: fixed;
    z-index: 2;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
}

/* Modal Content */
.modal-content {
    background-color: #2d2d2d;
    box-shadow: #000 0px 5px 15px;
    color: white;
    margin: auto;
    padding: 20px;
    border: none;
    border-radius: 15px;
    width: 40vw;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Modal Forms */
.modal-content label {
    margin-top: .5rem;
}

.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    margin: 5px 0 15px 0;
    font-size: 1rem;
    font-family: Arial;
    color: #333;
    background: white;
    border: none;
    border-radius: 8px;
}

.modal-content input[type="submit"] {
    font-family: 'Tektur';
    font-size: 1.25rem;
    width: stretch;
    margin: 1rem;
    background: white;
    border: none;
    border-radius: 15px;
}

/* The Close Button */
.close {
    color: #aaaaaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .modal-content {
        width: 80vw;
    }
}

/* ---------------------------- */
/* -- Create Modal (wider) ----- */
/* ---------------------------- */

#create-modal .modal-content {
    width: 60vw;
}

@media (max-width: 600px) {
    #create-modal .modal-content {
        width: 90vw;
    }
}

/* ---------------------------- */
/* --- Template Selector ------- */
/* ---------------------------- */

.template-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.template-option {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: border-color 0.15s, box-shadow 0.15s;
    display: block;
}

.template-option input[type="radio"] {
    display: none;
}

.template-option img {
    width: 100%;
    display: block;
    object-fit: cover;
    background: #444;
}

.template-option:has(input:checked) {
    border-color: #00857D;
    box-shadow: 0 0 0 2px #00857D;
}

.template-option:hover:not(:has(input:checked)) {
    border-color: #555;
}

#create-submit-btn {
    font-family: 'Tektur', sans-serif;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    background: #00857D;
    color: white;
    padding: 0.6rem 1.5rem;
    cursor: pointer;
    margin-top: 0.75rem;
    display: block;
}

/* ----------------- */
/* - Profile Modal - */
/* ----------------- */

.profile-button {
    font-family: 'Tektur';
    font-size: 1.25rem;
    width: stretch;
    margin: 1rem;
    background: white;
    border-radius: 15px;
}

.avatar {
    border-radius: 100%;
    aspect-ratio: 1;
    width: 300px;
}

#avatar-container {
    position: relative;
    width: 300px;
}

.image-button {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    border-radius: 100%;
    background-color: rgba(83, 83, 83, 0.646);
    cursor: pointer;
}

#avatar-container:hover .image-button {
    display: flex;
    align-items: center;
    justify-content: center;
}

#profile-modal .modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#profile-modal .close {
    align-self: flex-end;
}

/* Navigation */
nav {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 0;
    justify-content: center;
    gap: 1.5rem;
    position: absolute;
    top: 0;
    z-index: 10;
    width: 100vw;
    display: flex;
}

nav a {
    text-decoration: none;
    color: white;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.2s;
}

nav a:hover, nav a.active {
    background: var(--primary);
    color: #00857D;
}
