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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4c51bf;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    color: #667eea;
}

.nav-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #4c51bf;
    cursor: pointer;
    display: none;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 80px;
    width: 280px;
    height: calc(100vh - 80px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 999;
}

.sidebar-nav {
    padding: 2rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(102, 126, 234, 0.1);
    color: #4c51bf;
    border-left-color: #667eea;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

/* Main Content */
.main {
    margin-left: 280px;
    margin-top: 80px;
    padding: 2rem;
    min-height: calc(100vh - 80px);
}

.section {
    display: none;
    animation: fadeInUp 0.6s ease;
}

.section.active {
    display: block;
}

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

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.section-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3.5rem;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

/* Hero Animation */
.hero-animation {
    margin: 3rem 0;
}

.cpu-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.cpu-chip {
    width: 120px;
    height: 120px;
    background: #2d3748;
    border-radius: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    position: relative;
}

.cpu-core {
    background: #667eea;
    border-radius: 8px;
    animation: coreActivity 2s ease-in-out infinite;
}

.cpu-core:nth-child(2) { animation-delay: 0.5s; }
.cpu-core:nth-child(3) { animation-delay: 1s; }
.cpu-core:nth-child(4) { animation-delay: 1.5s; }

@keyframes coreActivity {
    0%, 100% { opacity: 0.6; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.1); }
}

.data-flow {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.data-packet {
    width: 60px;
    height: 8px;
    background: #48bb78;
    border-radius: 4px;
    animation: dataFlow 3s ease-in-out infinite;
}

.data-packet:nth-child(2) { animation-delay: 1s; }
.data-packet:nth-child(3) { animation-delay: 2s; }

@keyframes dataFlow {
    0% { transform: translateX(-100px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100px); opacity: 0; }
}

/* Topic Grid */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.topic-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.topic-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.topic-card i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

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

.topic-card p {
    color: #4a5568;
}

/* Content Cards */
.content-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.content-card h3 {
    font-size: 1.8rem;
    color: #2d3748;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-card h3 i {
    color: #667eea;
}

/* CPU Diagram */
.cpu-diagram {
    margin: 2rem 0;
}

.cpu-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 500px;
    margin: 0 auto;
}

.alu-section,
.control-section {
    background: #4c51bf;
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.alu-section::before,
.control-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.alu-section h4,
.control-section h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.component-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.component {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.component h5 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.component ul {
    list-style: none;
    padding-left: 0;
}

.component li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.component li::before {
    content: '•';
    color: #667eea;
    position: absolute;
    left: 0;
}

/* Memory Comparison */
.memory-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

.memory-type {
    text-align: center;
}

.memory-type h4 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.memory-visual {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 1rem 0;
}

.memory-cell {
    width: 30px;
    height: 40px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    background: #f7fafc;
    transition: all 0.3s ease;
}

.memory-cell.active {
    background: #667eea;
    border-color: #4c51bf;
    animation: memoryActivity 2s ease-in-out infinite;
}

.memory-cell.fixed {
    background: #e53e3e;
    border-color: #c53030;
}

@keyframes memoryActivity {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.comparison-table {
    margin-top: 2rem;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.comparison-table th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.comparison-table tr:nth-child(even) {
    background: #f8f9fa;
}

/* System Unit Diagram */
.system-unit-diagram {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.motherboard {
    width: 400px;
    height: 300px;
    background: #2d3748;
    border-radius: 15px;
    padding: 20px;
    position: relative;
    display: grid;
    grid-template-areas: 
        "cpu ram ram"
        "slots slots slots";
    gap: 15px;
    border: 3px solid #4a5568;
}

.cpu-socket {
    grid-area: cpu;
    background: #4c51bf;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.ram-slots {
    grid-area: ram;
    display: flex;
    gap: 10px;
}

.ram-slot {
    flex: 1;
    background: #48bb78;
    border-radius: 4px;
}

.expansion-slots {
    grid-area: slots;
    display: flex;
    gap: 10px;
}

.slot {
    flex: 1;
    height: 15px;
    background: #ed8936;
    border-radius: 4px;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.step-number {
    background: #667eea;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

/* Software Comparison */
.software-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

.software-type {
    text-align: center;
}

.software-type h4 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.software-visual {
    margin: 1rem 0;
    height: 150px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
}

.os-layer,
.driver-layer,
.utility-layer,
.app-layer {
    padding: 0.5rem;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
}

.os-layer {
    background: #667eea;
    color: white;
}

.driver-layer {
    background: #4c51bf;
    color: white;
}

.utility-layer {
    background: #2d3748;
    color: white;
}

.app-layer {
    background: #48bb78;
    color: white;
    margin-bottom: 3px;
}

.description {
    text-align: left;
}

.description p {
    margin-bottom: 0.5rem;
}

.description ul {
    list-style: none;
    padding-left: 0;
}

.description li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.3rem;
}

.description li::before {
    content: '✓';
    color: #48bb78;
    position: absolute;
    left: 0;
}

/* Spreadsheet Demo */
.spreadsheet-demo {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.spreadsheet {
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.spreadsheet th,
.spreadsheet td {
    border: 1px solid #e2e8f0;
    padding: 0.8rem;
    text-align: center;
    min-width: 80px;
}

.spreadsheet th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.formula-cell {
    background: #fef5e7;
    font-family: 'Courier New', monospace;
    color: #d69e2e;
    font-weight: bold;
}

.function-cell {
    background: #e6fffa;
    font-family: 'Courier New', monospace;
    color: #319795;
    font-weight: bold;
}

.formula-explanation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.concept {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.concept h4 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.concept code {
    background: #2d3748;
    color: #f7fafc;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

/* Storage Animations */
.storage-necessity {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.reason {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 15px;
    border-top: 4px solid #667eea;
}

.reason i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.reason h4 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.storage-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

.storage-type {
    text-align: center;
}

.hdd-animation {
    width: 120px;
    height: 120px;
    margin: 1rem auto;
    position: relative;
    background: #2d3748;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.disk {
    width: 80px;
    height: 80px;
    border: 3px solid #667eea;
    border-radius: 50%;
    position: relative;
    animation: spin 2s linear infinite;
}

.disk::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 15px;
    height: 15px;
    background: #2d3748;
    border-radius: 50%;
}

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

.read-head {
    position: absolute;
    top: 30%;
    right: 20%;
    width: 20px;
    height: 30px;
    background: #ed8936;
    border-radius: 3px;
    animation: readMove 2s ease-in-out infinite;
}

@keyframes readMove {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-15px); }
}

.ssd-animation {
    width: 120px;
    height: 120px;
    margin: 1rem auto;
    background: #2d3748;
    border-radius: 10px;
    padding: 15px;
}

.flash-chips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    height: 100%;
}

.chip {
    background: #48bb78;
    border-radius: 4px;
    animation: flashActivity 1.5s ease-in-out infinite;
}

.chip:nth-child(2) { animation-delay: 0.3s; }
.chip:nth-child(3) { animation-delay: 0.6s; }
.chip:nth-child(4) { animation-delay: 0.9s; }

@keyframes flashActivity {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.technology-info {
    text-align: left;
    margin-top: 1rem;
}

.technology-info h5 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.technology-info ul {
    list-style: none;
    padding-left: 0;
}

.technology-info li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.technology-info li::before {
    content: '•';
    color: #667eea;
    position: absolute;
    left: 0;
}

.ssd-advantages {
    margin-top: 3rem;
}

.advantage-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.advantage {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #48bb78;
    text-align: center;
}

.advantage i {
    font-size: 2rem;
    color: #48bb78;
    margin-bottom: 1rem;
}

.advantage h5 {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

/* Storage Types Grid */
.storage-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.storage-category {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
}

.storage-category.magnetic {
    border-top: 4px solid #e53e3e;
}

.storage-category.optical {
    border-top: 4px solid #3182ce;
}

.storage-category.solid-state {
    border-top: 4px solid #38a169;
}

.storage-visual {
    width: 80px;
    height: 80px;
    margin: 1rem auto;
    border-radius: 50%;
}

.magnetic-visual {
    background: linear-gradient(45deg, #e53e3e, #c53030);
    position: relative;
}

.magnetic-visual::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    border: 3px solid white;
    border-radius: 50%;
    animation: magneticField 3s ease-in-out infinite;
}

@keyframes magneticField {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

.optical-visual {
    background: linear-gradient(45deg, #3182ce, #2c5282);
    position: relative;
}

.optical-visual::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 50%;
    animation: opticalSpin 2s linear infinite;
}

@keyframes opticalSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ssd-visual {
    background: linear-gradient(45deg, #38a169, #2f855a);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ssd-visual::before {
    content: '';
    width: 60%;
    height: 60%;
    background: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.3) 0px,
        rgba(255, 255, 255, 0.3) 3px,
        transparent 3px,
        transparent 6px
    );
    animation: ssdData 2s ease-in-out infinite;
}

@keyframes ssdData {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.characteristics {
    text-align: left;
    margin-top: 1rem;
}

.characteristics p {
    margin-bottom: 0.5rem;
}

.characteristics ul {
    list-style: none;
    padding-left: 0;
    margin: 0.5rem 0;
}

.characteristics li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.characteristics li::before {
    content: '→';
    color: #667eea;
    position: absolute;
    left: 0;
}

/* Storage Method Comparison */
.storage-difference {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

.storage-method {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 15px;
}

.magnetic-method {
    border-top: 4px solid #e53e3e;
}

.optical-method {
    border-top: 4px solid #3182ce;
}

.method-visual {
    width: 100px;
    height: 60px;
    margin: 1rem auto;
    position: relative;
}

.magnetic-field {
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        #e53e3e 0px,
        #e53e3e 10px,
        #c53030 10px,
        #c53030 20px
    );
    border-radius: 8px;
    animation: magneticPulse 2s ease-in-out infinite;
}

@keyframes magneticPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.laser-beam {
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, #3182ce, transparent);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    animation: laserScan 3s ease-in-out infinite;
}

@keyframes laserScan {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Input/Output Device Styles */
.device-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

.device-type {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 15px;
}

.input-devices {
    border-top: 4px solid #48bb78;
}

.output-devices {
    border-top: 4px solid #667eea;
}

.device-visual {
    margin: 1rem 0;
    font-size: 4rem;
    color: #667eea;
}

/* Input Categories */
.input-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.input-category {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
}

.keyboarding {
    border-top: 4px solid #667eea;
}

.pointing {
    border-top: 4px solid #48bb78;
}

.scanning {
    border-top: 4px solid #ed8936;
}

.device-demo {
    margin: 1rem 0;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.device-demo i {
    font-size: 3rem;
    color: #667eea;
}

.cursor {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #2d3748;
    clip-path: polygon(0 0, 0 20px, 7px 15px, 12px 20px, 15px 17px, 10px 12px, 20px 12px);
    animation: cursorMove 3s ease-in-out infinite;
}

@keyframes cursorMove {
    0%, 100% { transform: translate(-20px, -10px); }
    50% { transform: translate(20px, 10px); }
}

.scan-line {
    position: absolute;
    width: 60px;
    height: 2px;
    background: #ed8936;
    animation: scanning 2s ease-in-out infinite;
}

@keyframes scanning {
    0% { top: 20%; opacity: 1; }
    100% { top: 80%; opacity: 0.3; }
}

.device-info {
    text-align: left;
}

.device-info p {
    margin-bottom: 0.5rem;
}

/* Copy Types */
.copy-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

.copy-type {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 15px;
}

.soft-copy {
    border-top: 4px solid #667eea;
}

.hard-copy {
    border-top: 4px solid #48bb78;
}

.copy-visual {
    margin: 1rem auto;
    width: 100px;
    height: 80px;
    position: relative;
}

.screen {
    width: 100%;
    height: 100%;
    background: #2d3748;
    border-radius: 8px;
    border: 3px solid #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pixels {
    width: 80%;
    height: 60%;
    background: repeating-linear-gradient(
        90deg,
        #667eea 0px,
        #667eea 2px,
        #4c51bf 2px,
        #4c51bf 4px
    );
    animation: screenFlicker 2s ease-in-out infinite;
}

@keyframes screenFlicker {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.paper {
    width: 100%;
    height: 100%;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
}

.text-lines {
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 8px,
        #cbd5e0 8px,
        #cbd5e0 9px
    );
}

/* Monitor Features */
.monitor-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

.feature {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
}

.resolution {
    border-top: 4px solid #667eea;
}

.refresh-rate {
    border-top: 4px solid #48bb78;
}

.resolution-demo {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1rem 0;
}

.pixel-grid {
    width: 60px;
    height: 40px;
    border: 2px solid #2d3748;
    border-radius: 4px;
}

.high-res {
    background: repeating-linear-gradient(
        90deg,
        #667eea 0px,
        #667eea 1px,
        #4c51bf 1px,
        #4c51bf 2px
    );
}

.low-res {
    background: repeating-linear-gradient(
        90deg,
        #667eea 0px,
        #667eea 4px,
        #4c51bf 4px,
        #4c51bf 8px
    );
}

.refresh-demo {
    margin: 1rem 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.frame-indicator {
    width: 80px;
    height: 40px;
    border: 2px solid #48bb78;
    border-radius: 4px;
    background: linear-gradient(90deg, #48bb78, transparent);
    animation: frameRefresh 0.5s ease-in-out infinite;
}

@keyframes frameRefresh {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* Port Styles */
.ports-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

.port-type {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
}

.usb {
    border-top: 4px solid #667eea;
}

.hdmi {
    border-top: 4px solid #e53e3e;
}

.port-visual {
    width: 100px;
    height: 30px;
    margin: 1rem auto;
    border-radius: 5px;
    position: relative;
}

.usb-port {
    background: #2d3748;
    border: 2px solid #4a5568;
}

.usb-port::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    width: 15px;
    height: 8px;
    background: #667eea;
    border-radius: 2px;
}

.hdmi-port {
    background: #2d3748;
    border: 2px solid #4a5568;
    border-radius: 3px 10px 10px 3px;
}

.hdmi-port::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    width: 60px;
    height: 12px;
    background: #e53e3e;
    border-radius: 2px;
}

.port-info {
    text-align: left;
    margin-top: 1rem;
}

.port-info p {
    margin-bottom: 0.5rem;
}

/* Connectivity Styles */
.connectivity-explanation {
    margin: 2rem 0;
}

.concept-definition {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    border-left: 4px solid #667eea;
}

.connectivity-example {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
}

.wifi-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.device {
    font-size: 3rem;
    color: #2d3748;
}

.wifi-signals {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.signal {
    width: 30px;
    height: 3px;
    background: #48bb78;
    border-radius: 2px;
    animation: wifiSignal 2s ease-in-out infinite;
}

.signal:nth-child(2) {
    animation-delay: 0.3s;
}

.signal:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes wifiSignal {
    0%, 100% { opacity: 0.3; transform: scaleX(0.5); }
    50% { opacity: 1; transform: scaleX(1); }
}

/* Database Styles */
.data-info-flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    margin: 2rem 0;
}

.data-stage,
.information-stage {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
}

.data-stage {
    border-top: 4px solid #ed8936;
}

.information-stage {
    border-top: 4px solid #48bb78;
}

.processing-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    font-weight: 600;
}

.processing-arrow i {
    font-size: 2rem;
}

.data-example,
.info-example {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 8px;
}

.raw-data {
    background: #fed7d7;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.raw-data span {
    background: #e53e3e;
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-weight: bold;
}

.processed-info {
    background: #c6f6d5;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.processed-info span {
    background: #38a169;
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-weight: bold;
}

/* Primary Key Demo */
.primary-key-demo {
    margin: 2rem 0;
    overflow-x: auto;
}

.database-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.database-table th,
.database-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.database-table th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.primary-key-column {
    background: #48bb78 !important;
}

.primary-key-cell {
    background: #c6f6d5;
    font-weight: bold;
    color: #2f855a;
}

.primary-key-explanation {
    margin-top: 2rem;
}

.primary-key-explanation h4 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.primary-key-explanation ul {
    list-style: none;
    padding-left: 0;
}

.primary-key-explanation li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.primary-key-explanation li::before {
    content: '🔑';
    position: absolute;
    left: 0;
}

/* Table Structure */
.table-structure {
    margin: 2rem 0;
}

.field-record-demo {
    position: relative;
}

.demo-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.demo-table th,
.demo-table td {
    padding: 1rem;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.field-header {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.record-row {
    background: #f8f9fa;
}

.record-row:nth-child(even) {
    background: #e2e8f0;
}

.structure-labels {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.field-label,
.record-label {
    color: #667eea;
    font-weight: 600;
    font-size: 1.1rem;
}

.relationship-explanation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.field-concept {
    border-left: 4px solid #667eea;
}

.record-concept {
    border-left: 4px solid #48bb78;
}

/* Database Components */
.database-components {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.component {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
}

.tables {
    border-top: 4px solid #667eea;
}

.forms {
    border-top: 4px solid #48bb78;
}

.queries {
    border-top: 4px solid #ed8936;
}

.component-visual {
    margin: 1rem auto;
    width: 80px;
    height: 60px;
    position: relative;
}

.table-representation {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.table-row {
    height: 12px;
    border-radius: 2px;
}

.table-row.header {
    background: #667eea;
}

.table-row:not(.header) {
    background: #cbd5e0;
}

.form-representation {
    width: 100%;
    height: 100%;
    background: white;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-field {
    height: 8px;
    background: #e2e8f0;
    border-radius: 2px;
}

.form-button {
    height: 12px;
    background: #48bb78;
    border-radius: 4px;
    margin-top: auto;
}

.query-representation {
    width: 100%;
    height: 100%;
    background: white;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.query-line {
    height: 6px;
    background: #ed8936;
    border-radius: 2px;
}

.query-line.short {
    width: 60%;
}

.query-results {
    height: 20px;
    background: #c6f6d5;
    border-radius: 4px;
    margin-top: auto;
}

.student-system-example {
    margin-top: 3rem;
    background: #f0f7ff;
    padding: 2rem;
    border-radius: 15px;
    border-left: 4px solid #3182ce;
}

.system-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.flow-step {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    flex: 1;
    min-width: 200px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.step-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    background: #3182ce;
    color: white;
    border-radius: 50%;
    line-height: 30px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.flow-arrow {
    color: #3182ce;
    font-size: 1.5rem;
    font-weight: bold;
}

/* DNS Process */
.dns-process {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: center;
    margin: 2rem 0;
}

.dns-step {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
}

.dns-step h4 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.browser-bar {
    background: white;
    border: 2px solid #cbd5e0;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-family: 'Courier New', monospace;
    color: #3182ce;
}

.server-icon {
    font-size: 3rem;
    color: #4c51bf;
    margin-bottom: 0.5rem;
}

.ip-address {
    background: #2d3748;
    color: #48bb78;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
}

.webpage i {
    font-size: 3rem;
    color: #48bb78;
}

.dns-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #667eea;
    font-size: 1.5rem;
    font-weight: bold;
}

.dns-explanation {
    margin-top: 2rem;
}

.dns-explanation h4 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.dns-explanation ul {
    list-style: none;
    padding-left: 0;
}

.dns-explanation li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.dns-explanation li::before {
    content: '🌐';
    position: absolute;
    left: 0;
}

.dns-example {
    background: #f0f7ff;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #3182ce;
    margin-top: 1rem;
}

/* E-commerce Styles */
.transaction-types {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

.transaction-type {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
}

.b2c {
    border-top: 4px solid #48bb78;
}

.b2b {
    border-top: 4px solid #667eea;
}

.transaction-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.business-entity,
.consumer-entity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.business-entity i,
.consumer-entity i {
    font-size: 2.5rem;
    color: #2d3748;
}

.transaction-arrow {
    color: #667eea;
    font-size: 1.5rem;
    font-weight: bold;
}

.transaction-details {
    text-align: left;
}

.transaction-details p {
    margin-bottom: 0.5rem;
}

/* Business Benefits */
.business-benefits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

.benefit {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
}

.global-reach {
    border-top: 4px solid #48bb78;
}

.cost-reduction {
    border-top: 4px solid #ed8936;
}

.benefit-icon {
    margin-bottom: 1rem;
}

.benefit-icon i {
    font-size: 3rem;
    color: #667eea;
}

.benefit h4 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.benefit-visual {
    margin: 1rem 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.world-map {
    width: 100px;
    height: 60px;
    background: #4c51bf;
    border-radius: 50px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.connection-point {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #48bb78;
    border-radius: 50%;
    animation: connectionPulse 2s ease-in-out infinite;
}

.connection-point:nth-child(1) {
    top: 20%;
    left: 30%;
    animation-delay: 0s;
}

.connection-point:nth-child(2) {
    top: 60%;
    right: 25%;
    animation-delay: 0.7s;
}

.connection-point:nth-child(3) {
    bottom: 25%;
    left: 50%;
    animation-delay: 1.4s;
}

@keyframes connectionPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.5); opacity: 1; }
}

.cost-comparison {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.physical-store,
.online-store {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: bold;
}

.physical-store {
    background: #fed7d7;
    color: #c53030;
}

.online-store {
    background: #c6f6d5;
    color: #2f855a;
}

.benefit ul {
    text-align: left;
    list-style: none;
    padding-left: 0;
}

.benefit li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.3rem;
}

.benefit li::before {
    content: '✓';
    color: #48bb78;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Information Systems */
.is-components {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.component {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
}

.hardware-comp {
    border-top: 4px solid #e53e3e;
}

.software-comp {
    border-top: 4px solid #3182ce;
}

.data-comp {
    border-top: 4px solid #ed8936;
}

.people-comp {
    border-top: 4px solid #48bb78;
}

.procedures-comp {
    border-top: 4px solid #667eea;
}

.comp-icon {
    margin-bottom: 1rem;
}

.comp-icon i {
    font-size: 2.5rem;
    color: #2d3748;
}

.component h4 {
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.component p {
    font-size: 0.9rem;
    color: #4a5568;
}

.online-shopping-example {
    background: #f0f7ff;
    padding: 2.5rem;
    border-radius: 15px;
    border-left: 4px solid #3182ce;
    margin-top: 3rem;
}

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

.process-step {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.step-num {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: #3182ce;
    color: white;
    border-radius: 50%;
    line-height: 40px;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.step-content h5 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.step-content p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* System Interaction */
.system-interaction {
    margin: 2rem 0;
}

.component-interaction {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.motherboard-section,
.cpu-section,
.ram-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
}

.motherboard-section {
    border-top: 4px solid #ed8936;
}

.cpu-section {
    border-top: 4px solid #e53e3e;
}

.ram-section {
    border-top: 4px solid #48bb78;
}

.mb-visual,
.cpu-visual,
.ram-visual {
    width: 80px;
    height: 60px;
    margin: 1rem auto;
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mb-visual {
    background: #ed8936;
}

.mb-connections {
    width: 60%;
    height: 60%;
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.3) 0px,
        rgba(255, 255, 255, 0.3) 5px,
        transparent 5px,
        transparent 10px
    );
}

.cpu-visual {
    background: #e53e3e;
}

.processing-cores {
    width: 60%;
    height: 60%;
    background: repeating-conic-gradient(
        rgba(255, 255, 255, 0.3) 0deg 90deg,
        transparent 90deg 180deg
    );
    animation: coreProcessing 2s linear infinite;
}

@keyframes coreProcessing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ram-visual {
    background: #48bb78;
}

.memory-slots {
    width: 60%;
    height: 60%;
    background: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.4) 0px,
        rgba(255, 255, 255, 0.4) 8px,
        transparent 8px,
        transparent 16px
    );
    animation: memoryAccess 1.5s ease-in-out infinite;
}

@keyframes memoryAccess {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.launch-process {
    background: #f0f7ff;
    padding: 2rem;
    border-radius: 15px;
    border-left: 4px solid #3182ce;
}

.launch-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.launch-step {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.step-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #3182ce;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    flex-shrink: 0;
}

.launch-step p {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    padding: 2rem;
    margin-left: 280px;
    margin-top: 2rem;
    color: #4a5568;
}

.footer p {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main {
        margin-left: 0;
        padding: 1rem;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .nav-toggle {
        display: block;
    }
    
    .footer {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .topic-grid {
        grid-template-columns: 1fr;
    }
    
    .component-grid,
    .memory-comparison,
    .software-comparison {
        grid-template-columns: 1fr;
    }
    
    .data-info-flow {
        grid-template-columns: 1fr;
    }
    
    .processing-arrow {
        transform: rotate(90deg);
        margin: 1rem 0;
    }
    
    .dns-process {
        grid-template-columns: 1fr;
    }
    
    .dns-arrow {
        transform: rotate(90deg);
        margin: 0.5rem 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .content-card {
        padding: 1.5rem;
    }
    
    .cpu-animation {
        flex-direction: column;
        gap: 1rem;
    }
}