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

:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent: #8b5cf6;
    --accent-hover: #7c3aed;
    --border: #334155;
    --success: #10b981;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background-color: var(--bg-tertiary);
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.gradient-text {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.search-container {
    max-width: 700px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.search-icon {
    color: var(--text-muted);
    margin-right: 0.75rem;
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.search-btn:hover {
    background-color: var(--accent-hover);
}

.info-box {
    background-color: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: start;
}

.info-box p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

section {
    margin-bottom: 4rem;
}

section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.back-button-container {
    text-align: center;
    margin-bottom: 2rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.back-btn:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--accent);
    transform: translateX(-4px);
}

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

.quick-link-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.quick-link-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.quick-link-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.quick-link-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.quick-link-url {
    color: var(--accent);
    font-size: 0.875rem;
    word-break: break-all;
}

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

.resource-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.2s;
    cursor: pointer;
}

.resource-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.resource-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.resource-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.resource-count {
    background-color: var(--accent);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-secondary);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-right: 2rem;
}

.modal-body {
    text-align: center;
}

.unlock-screen,
.countdown-screen,
.resources-screen {
    padding: 2rem 0;
}

.unlock-screen svg {
    margin-bottom: 1rem;
}

.unlock-screen h4,
.countdown-screen h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.unlock-screen p,
.countdown-screen p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.unlock-btn,
.open-btn {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.unlock-btn:hover,
.open-btn:hover {
    background-color: var(--accent-hover);
    transform: scale(1.05);
}

.spinner {
    border: 4px solid var(--border);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.countdown-text {
    font-size: 1.125rem;
}

.countdown-text span {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.5rem;
}

.success-message {
    margin-bottom: 1.5rem;
}

.success-message svg {
    margin-bottom: 0.5rem;
}

.success-message p {
    color: var(--success);
    font-weight: 600;
    font-size: 1.125rem;
}

.links-list {
    text-align: left;
}

.link-item {
    background-color: var(--bg-tertiary);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}

.link-item:hover {
    background-color: rgba(139, 92, 246, 0.1);
}

.link-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.link-url {
    color: var(--accent);
    text-decoration: none;
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.link-url:hover {
    text-decoration: underline;
}

.hidden {
    display: none !important;
}

body.light-mode {
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border: #cbd5e1;
}

body.light-mode .modal {
    background-color: rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .quick-links-grid,
    .resources-grid {
        grid-template-columns: 1fr;
    }
}
