:root {
    --bg-color: #020617;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.5);
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.15) 0, transparent 50%),
        radial-gradient(at 50% 0%, rgba(168, 85, 247, 0.1) 0, transparent 50%),
        radial-gradient(at 100% 0%, rgba(56, 189, 248, 0.15) 0, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-main);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* Animated background blobs */
body::before,
body::after {
    content: "";
    position: fixed;
    width: 600px;
    height: 600px;
    filter: blur(100px);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.4;
    animation: move 20s infinite alternate;
}

body::before {
    background: radial-gradient(circle, var(--accent), transparent);
    top: -10%;
    left: -10%;
}

body::after {
    background: radial-gradient(circle, #a855f7, transparent);
    bottom: -10%;
    right: -10%;
    animation-delay: -10s;
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(100px, 100px) scale(1.2);
    }
}

/* Hamburger Menu Button */
.hamburger-btn {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 1001;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.75rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 45px;
    height: 45px;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.hamburger-btn:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--accent);
}

.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Sidebar Toggle States */
@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        margin: 0;
        border-radius: 0;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .app-layout {
        margin-left: 0;
    }
}

@media (min-width: 769px) {
    .hamburger-btn {
        display: none;
    }

    .sidebar-overlay {
        display: none;
    }
}

.app-layout {
    display: flex;
    gap: 2rem;
    width: 95%;
    max-width: 1200px;
    margin: 2rem auto;
    height: calc(100vh - 8rem);
}

.sidebar {
    flex: 0 0 300px;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeInLeft 0.8s ease-out;
}

.sidebar-header {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--accent);
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
}

.sidebar-footer p {
    margin: 0;
    line-height: 1.5;
}

.sidebar-footer strong {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

#historyList {
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 0.5rem;
}

.history-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    transform: translateX(5px);
}

.history-item .history-date {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.delete-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 0.5rem;
    opacity: 0;
    transition: all 0.2s ease;
    width: 30px;
    min-width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-item:hover .delete-btn {
    opacity: 1;
}


.delete-btn:hover {
    color: #ef4444;
    /* Error red */
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

.main-content {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 1rem;
    display: flex;
    flex-direction: column;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Existing transitions and animations */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

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

.container {
    width: 100%;
    margin: 0;
    max-width: none;
    padding: 0;
}

/* Buy Button Styling */
.buy-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    text-decoration: none;
    margin-left: 0.5rem;
    border: 1px solid rgba(56, 189, 248, 0.2);
    transition: all 0.2s ease;
}

.buy-link:hover {
    background: var(--accent);
    color: white;
}


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

.input-section {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: -0.05em;
    filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.3));
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1rem;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

button {
    background: linear-gradient(135deg, var(--accent), #0284c7);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(14, 165, 233, 0.4);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

#results {
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.result-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
}

/* AI Response Styling */
.result-card h3 {
    color: var(--accent);
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.result-card h3:first-child {
    margin-top: 0;
}

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

.result-card li {
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.result-card strong {
    color: #fff;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
    margin-top: 1rem;
    text-align: center;
}

@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 spin {
    to {
        transform: rotate(360deg);
    }
}

.yt-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 0.6rem 1.2rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.8rem;
    margin-right: 0.5rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.yt-link:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(239, 68, 68, 0.4);
}

.result-card h3:last-of-type {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
    margin-top: 2rem;
}

.app-footer {
    margin-top: auto;
    padding: 4rem 0;
    text-align: center;
    width: 100%;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-socials a {
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.footer-socials a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.copyright {
    font-size: 0.7rem;
    opacity: 0.4;
    margin-top: 0.5rem;
}

/* Navigation Styles */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
}

.nav-link svg {
    opacity: 0.7;
}

.nav-link:hover svg,
.nav-link.active svg {
    opacity: 1;
}

/* Features Page Styles */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding-bottom: 4rem;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.feature-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px -10px rgba(56, 189, 248, 0.15);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
}

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

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* How it Works Page Styles */
.steps-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-bottom: 4rem;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.step-card {
    display: flex;
    gap: 2rem;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    align-items: flex-start;
}

.step-number {
    background: var(--accent);
    color: var(--bg-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.step-content h3 {
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.step-content p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.step-arrow {
    text-align: center;
    font-size: 2rem;
    opacity: 0.3;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.result-card tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* Enhanced Result Styles */
.result-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.result-section h3 {
    color: var(--accent);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Table Enhancements */
.result-card table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.75rem;
    overflow: hidden;
    font-size: 0.95rem;
}

.result-card th,
.result-card td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.result-card th {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

/* Highlight Recommended Column */
.result-card th:nth-child(3),
.result-card td:nth-child(3) {
    background: rgba(56, 189, 248, 0.05);
}

.result-card tr:last-child {
    font-weight: 700;
    background: rgba(56, 189, 248, 0.1);
}

.result-card tr:last-child td {
    border-bottom: none;
    color: var(--accent);
}

.yt-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: #ff0000;
    /* YouTube Red */
    font-weight: 600;
    text-decoration: none;
}

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

/* Beginner Section Styling */
.beginner-section {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.2);
    position: relative;
    overflow: hidden;
}

.beginner-section::before {
    content: "🔰";
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 5rem;
    opacity: 0.05;
    transform: rotate(15deg);
}

.beginner-section h3 {
    color: #34d399;
}