/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-bg: #0f172a;
    --light-bg: #1e293b;
    --card-bg: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #475569;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.network-node {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: float 20s infinite linear;
    box-shadow: 0 0 10px var(--accent-color);
}

.network-node:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.network-node:nth-child(2) {
    top: 20%;
    left: 80%;
    animation-delay: 2s;
}

.network-node:nth-child(3) {
    top: 60%;
    left: 20%;
    animation-delay: 4s;
}

.network-node:nth-child(4) {
    top: 80%;
    left: 70%;
    animation-delay: 6s;
}

.network-node:nth-child(5) {
    top: 50%;
    left: 50%;
    animation-delay: 8s;
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

.logo i {
    margin-right: 10px;
    font-size: 2rem;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    background: radial-gradient(ellipse at bottom, #1e3a8a 0%, #0f172a 100%);
}

.hero-content {
    text-align: center;
    margin-bottom: 3rem;
}

.glitch {
    font-size: 4rem;
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    animation: glitch 2s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: var(--accent-color);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: var(--success-color);
    z-index: -2;
}

@keyframes glitch {
    0%, 100% {
        text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
    }
}

@keyframes glitch-1 {
    0%, 100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0);
    }
    20% {
        clip-path: inset(20% 0 30% 0);
        transform: translate(-2px, 2px);
    }
    40% {
        clip-path: inset(50% 0 20% 0);
        transform: translate(2px, -2px);
    }
    60% {
        clip-path: inset(10% 0 60% 0);
        transform: translate(-2px, 0);
    }
}

@keyframes glitch-2 {
    0%, 100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0);
    }
    20% {
        clip-path: inset(60% 0 10% 0);
        transform: translate(2px, -1px);
    }
    40% {
        clip-path: inset(20% 0 50% 0);
        transform: translate(-2px, 1px);
    }
    60% {
        clip-path: inset(70% 0 10% 0);
        transform: translate(1px, -2px);
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin: 1rem 0 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--card-bg);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: bold;
    color: var(--accent-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Search Section */
.search {
    padding: 80px 0;
    background: var(--bg-color);
}

.search-container {
    max-width: 900px;
    margin: 0 auto;
}

.search-filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto auto;
    gap: 15px;
    margin-bottom: 30px;
}

/* Responsive search filters */
@media (max-width: 968px) {
    .search-filters {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .search-filters input,
    .search-filters select {
        width: 100%;
    }
    
    .search-btn,
    .clear-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .search-filters {
        grid-template-columns: 1fr;
    }
}

.search-filters input,
.search-filters select {
    padding: 12px 15px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-filters input:focus,
.search-filters select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-btn,
.clear-btn {
    padding: 12px 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover,
.clear-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.clear-btn {
    background: var(--secondary-color);
}

.clear-btn:hover {
    background: #c0392b;
}

.search-results {
    display: grid;
    gap: 15px;
}

.search-result {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-result:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-color);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.result-topic {
    font-weight: 600;
    color: var(--accent-color);
}

.result-difficulty {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.result-difficulty.ccna {
    background: var(--success-color);
    color: white;
}

.result-difficulty.ccnp {
    background: var(--warning-color);
    color: white;
}

.result-difficulty.ccie {
    background: var(--danger-color);
    color: white;
}

.result-question {
    color: var(--text-color);
    margin-bottom: 8px;
    line-height: 1.5;
}

.result-category {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.no-results {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 40px;
}

/* Bookmarks Section */
.bookmarks {
    padding: 80px 0;
    background: var(--bg-color);
}

.bookmark-list {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    gap: 15px;
}

.bookmark-item {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.bookmark-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-color);
}

.bookmark-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.bookmark-topic {
    font-weight: 600;
    color: var(--accent-color);
}

.remove-bookmark {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-bookmark:hover {
    background: #c0392b;
}

.bookmark-question {
    color: var(--text-color);
    line-height: 1.5;
}

.no-bookmarks {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 40px;
}

/* Topics Section */
.topics {
    padding: 80px 0;
    background: var(--light-bg);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-1);
    border-radius: 2px;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.section-divider {
    grid-column: 1 / -1;
    text-align: center;
    margin: 2rem 0 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
}

.divider-title {
    color: var(--accent-color);
    font-size: 1.3rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--dark-bg);
    padding: 0 1.5rem;
    position: relative;
    top: -1.8rem;
}

.divider-title i {
    color: var(--warning-color);
}

.topic-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.topic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.topic-card:hover::before {
    transform: scaleX(1);
}

.topic-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.topic-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.topic-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.topic-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--dark-bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-1);
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Practice Section */
.practice {
    padding: 80px 0;
    background: var(--dark-bg);
}

.question-container {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.question-number {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--accent-color);
}

.question-topic {
    color: var(--text-secondary);
}

.difficulty-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.difficulty-badge.ccna {
    background: var(--success-color);
    color: white;
}

.difficulty-badge.ccnp {
    background: var(--warning-color);
    color: white;
}

.difficulty-badge.ccie {
    background: var(--danger-color);
    color: white;
}

.question h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.answer-toggle {
    text-align: center;
    margin: 2rem 0;
}

.toggle-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.answer {
    background: var(--light-bg);
    border-radius: 10px;
    padding: 2rem;
    margin-top: 2rem;
    animation: slideIn 0.5s ease;
}

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

.answer-content h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.answer-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.real-world {
    background: var(--dark-bg);
    border-left: 4px solid var(--accent-color);
    padding: 1rem;
    margin-top: 1.5rem;
    border-radius: 5px;
}

.real-world h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.question-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.action-btn {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.action-btn.bookmark:hover {
    background: var(--warning-color);
}

.study-modes {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
}

.study-modes h3 {
    margin-bottom: 1.5rem;
}

.mode-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.mode-btn {
    background: var(--light-bg);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mode-btn.active,
.mode-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: scale(1.05);
}

/* Progress Section */
.progress {
    padding: 80px 0;
    background: var(--light-bg);
}

.progress-dashboard {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: start;
}

.progress-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
}

.progress-card h3 {
    margin-bottom: 2rem;
}

.circular-progress {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto;
}

.circular-progress svg {
    width: 140px;
    height: 140px;
    position: relative;
}

.circular-progress svg circle {
    width: 100%;
    height: 100%;
    fill: none;
    stroke-width: 10;
    stroke: var(--dark-bg);
    stroke-linecap: round;
    transform: translate(5px, 5px);
}

.circular-progress svg circle:nth-child(2) {
    stroke: var(--accent-color);
    stroke-dasharray: 440;
    stroke-dashoffset: 440;
    animation: progress 2s ease-out forwards;
}

@keyframes progress {
    to {
        stroke-dashoffset: calc(440 - (440 * var(--percent)) / 100);
    }
}

.progress-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: bold;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-item {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
}

.stat-item i {
    font-size: 2rem;
    color: var(--accent-color);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-info span:first-child {
    font-size: 1.5rem;
    font-weight: bold;
}

.stat-info span:last-child {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--dark-bg);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--light-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 1rem;
    }

    .glitch {
        font-size: 2.5rem;
    }

    .hero-stats {
        gap: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .progress-dashboard {
        grid-template-columns: 1fr;
    }

    .question-header {
        flex-direction: column;
        text-align: center;
    }

    .question-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 200px;
        justify-content: center;
    }

    .topics-grid {
        grid-template-columns: 1fr;
    }

    .mode-buttons {
        flex-direction: column;
    }

    .mode-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--card-bg);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-color);
}
