/* Main CSS - Core styles for all pages */

/* Font Face */
@font-face {
    font-family: 'Bebas Neue';
    src: url('https://cdn.oneiricsky.com/assets/fonts/bebasneu.ttf') format('truetype');
    font-display: swap;
}

/* CSS Variables for consistent theming */
:root {
    --primary-bg: #f8f9fa;
    --primary-text: #333;
    --header-bg: transparent;
    --content-bg: #f8f9fa;
    --border-radius: 12px;
    --transition-speed: 0.3s;
    --accent: #e06c75;
    --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    --header-height: 80px;
}

/* Dark mode variables */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-bg: #1a1a1a;
        --primary-text: #e0e0e0;
        --content-bg: #1a1a1a;
    }
}

/* Base reset and typography */
* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

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

h1 {
    color: var(--primary-text);
    text-align: center;
    margin-bottom: 0.5em;
    font-size: 2.6rem;
    letter-spacing: 2px;
    font-family: 'Bebas Neue', -apple-system, BlinkMacSystemFont, sans-serif;
    transition: all var(--transition-speed) ease;
}

a {
    color: var(--primary-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent);
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Page transitions */
.fade-out {
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: fadeIn var(--transition-speed) ease forwards;
}

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

body.fade-out {
    opacity: 0;
}

/* Header and Navigation */
.header {
    font-family: 'Bebas Neue', -apple-system, BlinkMacSystemFont, sans-serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--header-bg);
    color: var(--primary-text);
    padding: 1.2rem 2.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background var(--transition-speed) ease;
}

.header a,
.header nav ul {
    text-decoration: none;
    list-style: none;
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: opacity 0.2s, color 0.2s, transform 0.2s;
    padding-inline-start: 0 !important;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.header a:hover {
    opacity: 0.8;
    transform: translateY(-1px);
    color: var(--accent, var(--header-text));
}

.header .left {
    font-weight: 700;
    font-size: 1.8rem;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
    height: 2.5rem;
    width: auto;
    display: inline-block;
}

.header .right {
    font-size: 1.4rem;
}

.header nav ul {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.header .center-title {
    display: none;
}

/* Content Layout */
.content {
    margin: 3rem auto;
    max-width: 800px;
    padding: 3rem;
    background: var(--content-bg);
    border-radius: var(--border-radius);
    text-align: center;
    transition: background var(--transition-speed) ease;
}

.content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.content li {
    margin: 2rem 0;
    position: relative;
}

main {
    flex: 1 0 auto;
    width: 100%;
    max-width: 1050px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card {
    background: var(--content-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    font-family: sans-serif;
    padding: 2rem 2rem 1rem 2rem;
    width: 100%;
    max-width: 1050px;
    margin-bottom: 2rem;
    margin-top: 0.5rem;
}

@media (prefers-color-scheme: dark) {
    .card {
        box-shadow: none;
    }
}

.subtitle {
    font-family: 'Bebas Neue', -apple-system, BlinkMacSystemFont, sans-serif;
    text-align: center;
    color: var(--accent, #e06c75);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
    letter-spacing: 1px;
}

/* Tooltip animations */
.desc-hover {
    position: relative;
    cursor: pointer;
}

.desc-text {
    opacity: 0;
    position: relative;
    color: #fff;
    font-size: 1rem;
    z-index: 10;
    transform: translateY(-8px);
    transition: opacity 0.25s cubic-bezier(.4, 0, .2, 1), transform 0.25s cubic-bezier(.4, 0, .2, 1);
    text-align: left;
    pointer-events: none;
}

.desc-hover:hover+.desc-text,
.desc-hover:focus+.desc-text {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Info sections */
.info-list {
    margin: 0 0 1rem 0;
    padding: 0 0 0 1.2em;
}

.info-list li {
    margin-bottom: 0.3em;
    font-size: 1.02em;
    color: var(--primary-text);
}

.info-title {
    font-family: 'Bebas Neue', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--accent, #e06c75);
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.4em;
    font-size: 1.25em;
    letter-spacing: 0.05em;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content {
        max-width: 700px;
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 1.5rem 1rem;
        text-align: center;
    }

    .header .right {
        width: 100%;
        text-align: center;
    }

    .content {
        margin: 2rem 1rem;
        padding: 2rem;
        max-width: none;
    }

    main {
        padding: 1.2rem 0.5rem;
    }

    .card {
        padding: 1.2rem 0.7rem 1rem 0.7rem;
    }

    h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 834px) and (orientation: portrait) {
    .header {
        flex-direction: column;
        gap: 0.8rem;
        padding: 1.2rem 1rem;
    }

    .header a,
    .header nav ul {
        font-size: 1.3rem;
    }

    .header .left {
        font-size: 1.6rem;
    }

    .header .right {
        font-size: 1.2rem;
    }

    .content {
        margin: 1.5rem 1rem;
        padding: 1.8rem;
    }
}

@media (max-width: 480px) {

    .header a,
    .header nav ul {
        font-size: 1.2rem;
    }

    .header .left {
        font-size: 1.5rem;
    }

    .header .right {
        font-size: 1.1rem;
    }

    .content {
        padding: 1.5rem;
        margin: 1rem 0.5rem;
    }

    .desc-text {
        min-width: 160px;
        font-size: 0.95rem;
        padding: 0.6em 0.8em;
    }
}

/* Force mobile layout for touch devices */
@media (hover: none) and (pointer: coarse) {
    .header {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 1rem !important;
        padding: 1.5rem 1rem !important;
        text-align: center !important;
    }

    .header .right {
        width: 100% !important;
        text-align: center !important;
    }

    .content {
        margin: 2rem 1rem !important;
        padding: 2rem !important;
        max-width: none !important;
    }
}
