:root {
    --bg-color: #0f0f11;
    --card-bg: #1a1a1e;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent: #6d28d9;
    --accent-hover: #5b21b6;
    --border-color: #27272a;
    --success-color: #10b981;
}

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

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.container {
    text-align: center;
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    margin: auto;
}

header {
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #a1a1aa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 300;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: zoomIn 0.6s ease-out 0.2s backwards;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(109, 40, 217, 0.2);
    border-color: var(--accent);
}

.card.flash-success {
    animation: flashGreen 0.6s ease-out;
}

.doom-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.doom-link:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(109, 40, 217, 0.5);
}

.destination-preview {
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-family: monospace;
    opacity: 0.7;
    font-size: 0.9rem;
}

.footer-links {
    margin-top: 3rem;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.secondary-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.6;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
    cursor: pointer;
}

.secondary-link:hover {
    opacity: 1;
    color: var(--text-primary);
    border-bottom: 1px solid var(--text-primary);
}

.footer-separator {
    color: var(--text-secondary);
    opacity: 0.4;
    margin: 0 0.5rem;
    font-size: 0.85rem;
    user-select: none;
}

.end-of-internet {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 4rem 2rem;
    animation: zoomIn 0.6s ease-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.end-of-internet h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 700;
    line-height: 1.2;
    background: linear-gradient(to right, #fff, #a1a1aa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.restart-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 100px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px rgba(109, 40, 217, 0.2);
}

.restart-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 15px 30px rgba(109, 40, 217, 0.4);
}

.restart-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

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

.modal-body {
    padding: 1rem;
    overflow-y: auto;
}

#all-links-list {
    list-style: none;
    padding: 0;
}

#all-links-list li {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
}

#all-links-list li:hover {
    background: rgba(255, 255, 255, 0.05);
}

#all-links-list a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: monospace;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
}

#all-links-list li:hover a {
    color: var(--text-primary);
}

/* Loading Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin-anim 1s ease-in-out infinite;
    display: none;
    margin: 0 auto;
}

@keyframes spin-anim {
    to { transform: rotate(360deg); }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes flashGreen {
    0% {
        background-color: var(--card-bg);
        border-color: var(--border-color);
    }

    30% {
        background-color: rgba(16, 185, 129, 0.2);
        border-color: var(--success-color);
        box-shadow: 0 0 40px rgba(16, 185, 129, 0.3);
    }

    100% {
        background-color: var(--card-bg);
        border-color: var(--accent);
    }
}

/* Wikipedia Fact Styles */
.wiki-fact {
    margin-top: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    text-align: left;
    animation: fadeInUp 0.5s ease-out;
}

.wiki-fact-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

#wiki-fact-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary);
    font-style: italic;
}

#wiki-fact-text a {
    color: #facc15;
    /* Option 2: Golden Yellow */
    text-decoration: none;
    border-bottom: 1px dotted rgba(250, 204, 21, 0.5);
    transition: all 0.2s ease;
}

#wiki-fact-text a:hover {
    color: #fde047;
    border-bottom-style: solid;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.4);
}
/* Security Fix: Extracted Inline Styles */
.hidden {
    display: none !important;
}
.block {
    display: block !important;
}
.mt-20 {
    margin-top: 20px;
}
.mb-10 {
    margin-bottom: 10px;
}
.section-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
}
.no-bullets {
    list-style-type: none;
    padding: 0;
}
.random-blog-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #3f3f46;
}
.random-blog-link-style {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #27272a;
    border-radius: 8px;
    text-decoration: none;
    color: white;
}
.random-blog-text-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.font-bold {
    font-weight: bold;
}
.random-blog-source {
    color: #a1a1aa;
    font-size: 0.8em;
    margin: 0;
    margin-top: 4px;
}
.icon-color {
    color: #a1a1aa;
}

/* Unvisited link items */
.unvisited-link-item {
    margin-bottom: 10px;
}
.unvisited-link-a {
    color: #fff;
    text-decoration: none;
    display: block;
    padding: 8px 12px;
    background-color: #27272a;
    border-radius: 6px;
}
.unvisited-link-a:hover {
    background-color: #3f3f46;
}

/* Sync Devices Modal Styles */
.sync-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sync-code-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #18181b;
    border: 1px solid #3f3f46;
    padding: 10px 14px;
    border-radius: 8px;
}
.sync-code-text {
    font-family: monospace;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    color: var(--accent);
}
.sync-input-container {
    display: flex;
    gap: 8px;
}
.sync-input {
    flex: 1;
    background: #18181b;
    border: 1px solid #3f3f46;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
}
.sync-input:focus {
    outline: none;
    border-color: var(--accent);
}
.sync-btn {
    background: #27272a;
    color: #fff;
    border: 1px solid #3f3f46;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.sync-btn:hover {
    background: #3f3f46;
}
.sync-btn-primary {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}
.sync-btn-primary:hover {
    background: #f4f4f5;
}
.feedback-msg {
    color: var(--success-color, #10b981);
    font-size: 0.85rem;
    margin: 4px 0 0 0;
}
.sync-status-text {
    font-size: 0.85rem;
    margin-top: 6px;
    min-height: 1.2em;
}

