* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background: #000000;
    min-height: 100vh;
    padding: 0;
    position: relative;
    overflow-x: hidden;
}

header {
    background: #0a0a0a;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    position: relative;
    border-bottom: 1px solid #1a1a1a;
}

.header-icon {
    font-size: 3rem;
    color: #800080;
    margin-bottom: 1rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #cccccc;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

header h1 i {
    margin-right: 0.5rem;
}

.subtitle {
    font-size: 1rem;
    color: #666666;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

main {
    max-width: 1500px;
    margin: 2rem auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.search-section {
    background: #0a0a0a;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    margin-bottom: 2rem;
    text-align: center;
    border: 1px solid #1a1a1a;
    position: relative;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #4a0080;
}

#questHeader {
    font-size: 1.8rem;
    font-weight: 500;
    color: #cccccc;
    margin-bottom: 1.5rem;
}

#questHeader i {
    margin-right: 0.5rem;
    color: #800080;
}

.search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #800080;
    pointer-events: none;
}

#search {
    width: 100%;
    padding: 12px 16px 12px 3rem;
    font-size: 1rem;
    border: 1px solid #333333;
    border-radius: 2px;
    outline: none;
    transition: all 0.15s ease;
    background: #1a1a1a;
    color: #cccccc;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

#search::placeholder {
    color: #666666;
}

#search:focus {
    border-color: #4a0080;
    background: #0a0a0a;
}

.quests {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

figure {
    background: #0a0a0a;
    border-radius: 4px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    transition: all 0.15s ease;
    margin: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid #1a1a1a;
    position: relative;
    overflow: hidden;
}

figure::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #4a0080;
    transform: scaleX(0);
    transition: transform 0.15s ease;
}

figure:hover::before {
    transform: scaleX(1);
}

figure:hover {
    border-color: #4a0080;
}

.image-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    justify-content: center;
}

figure img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    border: 1px solid #333333;
}

figure img:hover {
    transform: scale(1.05);
    border-color: #4a0080;
}

.figCap {
    color: #cccccc;
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
    padding: 1rem;
    background: #1a1a1a;
    border-radius: 2px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    border: 1px solid #333333;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.15s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 92%;
    max-height: 88%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    border: 1px solid #4a0080;
    animation: zoomIn 0.15s ease-in-out;
}

@keyframes zoomIn {
    from {
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #cccccc;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.15s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    border-radius: 2px;
    border: 1px solid #333333;
}

.close:hover {
    background: #4a0080;
    color: #ffffff;
    border-color: #6600b3;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #4a0080;
    color: #ffffff;
    border: none;
    font-size: 24px;
    padding: 12px 14px;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.15s ease;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.nav-btn:hover {
    background: #5a0099;
    box-shadow: 0 4px 15px rgba(74, 0, 128, 0.3);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.thumbnails-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 1001;
    background: #0a0a0a;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #1a1a1a;
}

.thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 2px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    opacity: 0.6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.thumbnail:hover {
    opacity: 1;
    transform: scale(1.05);
}

.thumbnail.active {
    opacity: 1;
    border-color: #4a0080;
    box-shadow: 0 0 15px rgba(74, 0, 128, 0.5);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    header {
        padding: 1.5rem 1rem;
    }
    .header-icon {
        font-size: 2rem;
    }
    header h1 {
        font-size: 1.8rem;
    }
    .subtitle {
        font-size: 0.9rem;
    }
    .search-section {
        padding: 1.5rem 1rem;
    }
    #questHeader {
        font-size: 1.5rem;
    }
    .quests {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    figure {
        padding: 1rem;
    }
    .image-container {
        flex-direction: column;
        align-items: center;
    }
    figure img {
        width: 200px;
        height: 200px;
    }
    .figCap {
        font-size: 0.9rem;
        padding: 0.8rem;
    }
    .close {
        top: 15px;
        right: 15px;
        font-size: 30px;
        width: 35px;
        height: 35px;
    }
    .nav-btn {
        padding: 10px 12px;
        font-size: 20px;
    }
    .prev-btn {
        left: 10px;
    }
    .next-btn {
        right: 10px;
    }
    .thumbnails-container {
        bottom: 20px;
        padding: 10px;
        gap: 8px;
    }
    .thumbnail {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    .header-icon {
        font-size: 1.8rem;
    }
    #questHeader {
        font-size: 1.3rem;
    }
    .quests {
        grid-template-columns: 1fr;
    }
    figure img {
        width: 100%;
        max-width: 250px;
        height: auto;
        aspect-ratio: 1;
    }
}
