* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

:root {
    --primary-color: #0ea5e9;
    --accent-color: #f97316;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    --text-light: #1e293b;
    --text-dark: #f1f5f9;
}

html, body {
    height: 100%;
}

body {
    background: linear-gradient(135deg, var(--bg-light) 0%, #e2e8f0 100%), url('https://www.transparenttextures.com/patterns/light-wool.png');
    background-blend-mode: overlay;
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease;
}

body.dark-mode {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1e293b 100%);
    color: var(--text-dark);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.1) 0%, transparent 70%);
    z-index: -1;
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    transition: opacity 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-circle {
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary-color);
    border-top: 4px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Header */
header {
    position: sticky;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

body.dark-mode header {
    background: rgba(15, 23, 42, 0.95);
}

header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--text-light);
    text-shadow: 0 0 10px rgba(249, 115, 22, 0.3);
    animation: glow 2s ease-in-out infinite alternate;
    will-change: transform;
}

body.dark-mode header h1 {
    color: var(--text-dark);
}

@keyframes glow {
    from { text-shadow: 0 0 5px rgba(249, 115, 22, 0.2); }
    to { text-shadow: 0 0 15px rgba(249, 115, 22, 0.4); }
}

.menu-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.menu-links a {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    font-size: 1rem;
    padding: 10px 20px;
    background: var(--primary-color);
    border-radius: 25px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
    position: relative;
    overflow: hidden;
}

.menu-links a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.menu-links a:hover::before,
.menu-links a:focus::before {
    width: 300px;
    height: 300px;
}

.menu-links a:hover,
.menu-links a:focus {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

#theme-toggle {
    background: var(--accent-color);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

#theme-toggle:hover {
    transform: scale(1.2) rotate(15deg);
}

/* About Section */
main {
    padding: 40px;
    max-width: 800px;
    margin: 0 auto 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    flex: 1 0 auto;
}

body.dark-mode main {
    background: rgba(15, 23, 42, 0.9);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 30px;
    text-align: center;
    text-transform: uppercase;
    position: relative;
}

body.dark-mode .section-title {
    color: var(--text-dark);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.section-title:hover::after {
    width: 80px;
}

.about-content {
    font-size: 1.1rem;
}

.about-content p {
    margin-bottom: 20px;
}

body.dark-mode .about-content {
    color: var(--text-dark);
}

.about-content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.about-content a:hover,
.about-content a:focus {
    color: var(--accent-color);
}

/* Version History Section */
.version-history {
    margin-top: 30px;
}

.version-history h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

body.dark-mode .version-history h3 {
    color: var(--text-dark);
}

.version-history h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: var(--primary-color);
}

.version-history ul {
    list-style: none;
    padding-left: 20px;
    position: relative;
}

.version-history ul::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--accent-color);
    opacity: 0.5;
}

.version-history li {
    position: relative;
    margin-bottom: 20px;
    padding-left: 30px;
}

.version-history li::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(249, 115, 22, 0.5);
}

.version-date {
    font-weight: 600;
    color: var(--primary-color);
}

.version-number {
    font-weight: 600;
    color: var(--accent-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background: var(--bg-light);
    color: var(--text-light);
    border-top: 1px solid rgba(249, 115, 22, 0.3);
    flex-shrink: 0;
}

body.dark-mode footer {
    background: var(--bg-dark);
    color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    header { padding: 10px 20px; flex-direction: column; }
    header h1 { font-size: 1.8rem; }
    .menu-links { gap: 10px; margin-top: 10px; }
    .menu-links a { font-size: 0.9rem; padding: 8px 16px; }
    main { padding: 20px; }
    .section-title { font-size: 1.8rem; }
    .version-history h3 { font-size: 1.3rem; }
    .version-history li { padding-left: 20px; }
}