:root {
    --primary: #00d2ff;
    --secondary: #3a7bd5;
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --glass-bg: rgba(15, 23, 42, 0.4);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

body {
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background: url('background.png') no-repeat center center fixed;
    background-size: cover;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: padding 0.3s ease, background 0.3s ease;
}

nav.scrolled {
    padding: 10px 50px;
    background: rgba(15, 23, 42, 0.8);
}

.nav-left {
    display: flex;
    align-items: center;
}

.menu-toggle {
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    background: none;
    border: none;
    margin-right: 20px;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}
.menu-toggle:hover {
    color: var(--primary);
}

.random-greeting {
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    max-width: 400px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 1px;
}

/* Music Player in Nav */
.nav-player {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 5px 15px;
    gap: 15px;
    flex: 1;
    max-width: 450px;
    margin: 0 20px;
}
.player-controls {
    display: flex;
    gap: 12px;
}
.player-controls button {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.3s;
    outline: none;
}
.player-controls button:hover {
    color: var(--primary);
}
.player-cover {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--glass-border);
    animation: spin 10s linear infinite;
    animation-play-state: paused;
}
.player-cover.playing {
    animation-play-state: running;
}
@keyframes spin {
    100% { transform: rotate(360deg); }
}
.player-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    gap: 3px;
}
.player-track-name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.player-lyrics {
    font-size: 0.75rem;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-bottom: 2px;
}
.player-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    margin-top: 2px;
}
.player-progress {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 2px;
    width: 0%;
    pointer-events: none;
    transition: width 0.1s linear;
}

.player-extra-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}
.player-extra-controls button {
    background: none; border: none; color: var(--text-main);
    cursor: pointer; font-size: 0.9rem; transition: color 0.3s;
    outline: none;
}
.player-extra-controls button:hover {
    color: var(--primary);
}
.volume-container {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 60px;
}
.volume-container input[type="range"] {
    width: 100%; height: 4px;
    -webkit-appearance: none;
    background: rgba(255,255,255,0.2);
    border-radius: 2px; outline: none;
}
.volume-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; width: 10px; height: 10px;
    border-radius: 50%; background: var(--primary); cursor: pointer;
}

/* Playlist Popup */
.playlist-popup {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 280px;
    max-height: 350px;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: none;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    z-index: 1001;
    overflow: hidden;
}
.playlist-popup.show {
    display: flex;
}
.playlist-header {
    padding: 12px 15px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--glass-border); font-weight: 600;
}
.playlist-header button {
    background: none; border: none; color: var(--text-main); cursor: pointer;
}
.playlist-list {
    list-style: none; overflow-y: auto; padding: 5px 0;
}
.playlist-list li {
    padding: 10px 15px; cursor: pointer; font-size: 0.85rem;
    display: flex; align-items: center; gap: 10px;
    transition: background 0.3s;
}
.playlist-list li:hover { background: rgba(255,255,255,0.1); }
.playlist-list li.playing { color: var(--primary); font-weight: 600; }

.lang-switch {
    display: flex;
    gap: 10px;
}

.lang-switch select {
    background: var(--glass-bg);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    border-radius: 5px;
    padding: 5px 10px;
    outline: none;
    cursor: pointer;
    backdrop-filter: blur(10px);
}
.lang-switch select option {
    background: #0f172a;
    color: #fff;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    z-index: 2000;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 80px 30px 30px;
    box-shadow: 10px 0 30px rgba(0,0,0,0.5);
}

.sidebar.open {
    left: 0;
}

.sidebar-close {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.3s, transform 0.3s;
}
.sidebar-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.sidebar-title {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    cursor: pointer;
}

.sidebar-links a i {
    color: var(--primary);
    width: 30px;
    font-size: 1.3rem;
    text-align: left;
}

.sidebar-links a:hover, .sidebar-links a.active {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border);
    transform: translateX(10px);
}

.sidebar-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.6);
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(5px);
}

.sidebar-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* Sections */
section {
    min-height: calc(100vh - 100px);
    padding: 120px 10% 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tab-content {
    display: flex; /* overridden by JS if hidden */
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 2px;
}

/* Glassmorphism Classes */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
    padding: 40px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 25px;
    transition: transform 0.3s, background 0.3s;
}
.glass-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

/* Common Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* Intro Section Specific */
.intro-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}
.intro-text { flex: 1; }
.intro-text h1 { font-size: 3rem; margin-bottom: 20px; line-height: 1.2; }
.intro-text p { font-size: 1.1rem; margin-bottom: 20px; color: var(--text-muted); }
.intro-image {
    width: 300px; height: 300px;
    border-radius: 50%; padding: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}
.intro-image img {
    width: 100%; height: 100%;
    border-radius: 50%; object-fit: cover; border: 4px solid transparent;
}

/* Blog Specific */
.blog-meta { font-size: 0.85rem; color: var(--primary); margin-bottom: 10px; }
.blog-title { font-size: 1.3rem; margin-bottom: 15px; }
.blog-desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; }
.read-more { color: var(--primary); text-decoration: none; font-weight: 600; font-size: 0.9rem; }

/* Toolbox Specific */
.tool-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 15px; text-align: center; }
.tool-title { text-align: center; font-size: 1.2rem; margin-bottom: 10px; }
.tool-desc { text-align: center; font-size: 0.9rem; color: var(--text-muted); }

/* Contact Specific */
.contact-info { text-align: center; margin-top: 50px; margin-bottom: 50px; }
.social-links { margin-top: 30px; display: flex; justify-content: center; gap: 20px; }
.social-links a {
    display: flex; align-items: center; justify-content: center;
    width: 50px; height: 50px; border-radius: 50%;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    color: var(--text-main); font-size: 1.5rem; transition: all 0.3s;
}
.social-links a:hover {
    background: var(--primary); color: #fff; transform: translateY(-5px);
}

/* Responsive */
@media (max-width: 900px) {
    .nav-player { display: none; } /* Hide player on very small screens for space */
    .intro-content { flex-direction: column; text-align: center; }
    nav { padding: 10px 20px; }
}
