@import url('https://fonts.googleapis.com/css2?family=Oxanium:wght@400;600;700&display=Oxanium');

:root {
    --rust-orange: #D94F00;
    --gunmetal-gray: #2A2F34;
    --faded-green: #4A7043;
    --metal-gray: #4B5E6A;
    --text-light: #E8ECEF;
}

body {
    font-family: 'Oxanium', sans-serif;
    color: var(--text-light);
    margin: 0;
    overflow-x: hidden;
    min-height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('https://qust-rust.ru/1.webm');
    background-size: cover;
}

.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.3;
}

.rust-panel {
    background: linear-gradient(145deg, rgba(42, 47, 52, 0.9), rgba(75, 94, 106, 0.9));
    border: 2px solid var(--rust-orange);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(217, 79, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rust-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(217, 79, 0, 0.5);
}

.rust-card {
    background: rgba(42, 47, 52, 0.95);
    border: 1px solid var(--metal-gray);
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.rust-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--rust-orange), transparent);
    transition: width 0.3s ease;
}

.rust-card:hover::before {
    width: 50%;
}

.rust-button {
    background: linear-gradient(45deg, var(--rust-orange), #CE422B);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    color: var(--text-light);
    font-weight: 600;
    border: 1px solid var(--metal-gray);
    box-shadow: 0 4px 15px rgba(217, 79, 0, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.rust-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(217, 79, 0, 0.5);
    background: linear-gradient(45deg, #CE422B, var(--rust-orange));
}

.rust-button-small {
    background: linear-gradient(45deg, var(--rust-orange), #CE422B);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.8rem;
    border: 1px solid var(--metal-gray);
    box-shadow: 0 2px 10px rgba(217, 79, 0, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.rust-button-small:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(217, 79, 0, 0.5);
    background: linear-gradient(45deg, #CE422B, var(--rust-orange));
}

.auth-container {
    background: rgba(42, 47, 52, 0.95);
    border: 2px solid var(--rust-orange);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    animation: fadeIn 1s ease;
}

h1, h2 {
    color: var(--text-light);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

h2 {
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--rust-orange);
    box-shadow: 0 0 10px var(--rust-orange);
}

.text-accent {
    color: var(--faded-green);
    font-weight: 600;
}

.rank {
    background: rgba(217, 79, 0, 0.2);
    color: var(--rust-orange);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.color-preview {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 0.5rem;
    vertical-align: middle;
    border: 1px solid var(--metal-gray);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    border: 3px solid var(--rust-orange);
    box-shadow: 0 0 15px rgba(217, 79, 0, 0.5);
    transition: all 0.3s ease;
}

.avatar:hover {
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 0 20px rgba(217, 79, 0, 0.7);
}

.logout-link {
    color: #CE422B;
    font-weight: 600;
    transition: all 0.2s ease;
}

.logout-link:hover {
    color: var(--rust-orange);
    text-decoration: none;
    text-shadow: 0 0 5px rgba(217, 79, 0, 0.5);
}

.countdown, .cooldown {
    font-family: 'Oxanium', sans-serif;
    font-size: 0.9rem;
    color: var(--text-light);
    background: rgba(217, 79, 0, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    border: 1px solid var(--rust-orange);
    display: inline-block;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, var(--rust-orange), transparent);
    margin: 1rem 0;
}

.quest-card {
    background: rgba(42, 47, 52, 0.95);
    border: 1px solid var(--rust-orange);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.quest-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(217, 79, 0, 0.3);
}

.quest-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    background: linear-gradient(90deg, rgba(217, 79, 0, 0.15), transparent);
    transition: background 0.3s ease;
}

.quest-header:hover {
    background: linear-gradient(90deg, rgba(217, 79, 0, 0.3), transparent);
}

.quest-header.active .quest-arrow {
    transform: rotate(180deg);
}

.quest-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.5rem;
    background: rgba(42, 47, 52, 0.9);
    transition: max-height 0.5s ease-out, padding 0.3s ease-out;
}

.quest-content.active {
    padding: 1rem 1.5rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
    position: relative;
}

.status-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8px;
    color: white;
}

.status-dot.bg-green-500::after {
    content: '✓';
}

.status-dot.bg-blue-500::after {
    content: '↻';
}

.status-dot.bg-yellow-500::after {
    content: '⏳';
}

.status-dot.bg-red-500::after {
    content: '✖';
}

.progress-bar {
    background: var(--metal-gray);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 0.5rem;
    position: relative;
}

.progress-fill {
    background: linear-gradient(90deg, var(--rust-orange), #CE422B);
    height: 100%;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);
    background-size: 20px 20px;
    animation: move 2s linear infinite;
}

.new-badge {
    background: var(--rust-orange);
    color: var(--text-light);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    animation: pulse 2s infinite;
}

.modal-content {
    max-height: calc(90vh - 140px);
    overflow-y: auto;
    scroll-behavior: smooth;
    padding: 1rem;
    position: relative;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--gunmetal-gray);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--rust-orange);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #CE422B;
}

.modal-content::before,
.modal-content::after {
    content: '';
    position: sticky;
    left: 0;
    right: 0;
    height: 20px;
    z-index: 1;
    pointer-events: none;
}

.modal-content::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(42, 47, 52, 0.95), transparent);
}

.modal-content::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(42, 47, 52, 0.95), transparent);
}

.modal-header {
    position: sticky;
    top: 0;
    background: rgba(42, 47, 52, 0.95);
    z-index: 20;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--rust-orange);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes move {
    0% { background-position: 0 0; }
    100% { background-position: 20px 20px; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

@media (max-width: 768px) {
    .grid-cols-responsive {
        grid-template-columns: 1fr;
    }
    .rust-card {
        padding: 1rem;
    }
    .avatar {
        width: 48px;
        height: 48px;
    }
    .modal-content {
        max-height: calc(85vh - 120px);
    }
    .quest-card {
        border-radius: 8px;
    }
    .quest-header {
        padding: 0.75rem 1rem;
    }
    .quest-content.active {
        padding: 0.75rem 1rem;
    }
    .quest-content {
        font-size: 0.9rem;
    }
    .modal-header {
        padding: 0.75rem 1rem;
    }
}