* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Tab Navigation Styles */
.tab-navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.8);
    color: white;
    font-family: inherit;
    font-size: 17px;
    font-weight: 800;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    color: white;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-shadow: none;
}

.tab-btn i {
    font-size: 18px;
}

/* Tab Content Styles */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

header {
    margin-bottom: 40px;
    color: white;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-left {
    text-align: left;
}

.cipher-intro {
    color: #fff;
    margin-bottom: 20px;
    font-size: 16px;
    opacity: 0.9;
}

.cipher-btn small {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
    font-weight: normal;
}

.header-right {
    display: flex;
    align-items: center;
}

.user-profile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
}

.user-name {
    color: white;
    font-weight: 500;
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    padding: 10px 0;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-profile:hover .user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    display: block;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.menu-item:hover {
    background-color: #f7fafc;
}

.login-btn {
    background: white;
    color: #667eea;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,255,255,0.3);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header h1 i {
    margin-right: 15px;
    color: #ffd700;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.main-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.cipher-selection {
    margin-bottom: 30px;
}

.cipher-selection h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #4a5568;
    font-size: 1.5rem;
}

.cipher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.cipher-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.cipher-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.cipher-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.cipher-btn i {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.practice-area {
    background: #f7fafc;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.cipher-info {
    text-align: center;
    margin-bottom: 25px;
}

.cipher-info h3 {
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.cipher-info p {
    color: #718096;
    font-size: 0.95rem;
}

.cipher-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group label {
    font-weight: 500;
    color: #4a5568;
}

.control-group select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
}

.generate-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.3);
}

.code-display {
    margin-bottom: 25px;
}

.code-display h4 {
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.encoded-text {
    background: #2d3748;
    color: #48bb78;
    padding: 20px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 2px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #4a5568;
}

.decode-section {
    margin-bottom: 25px;
}

.decode-section h4 {
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.input-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.input-group input {
    flex: 1;
    min-width: 250px;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.check-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.result {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.result.show {
    opacity: 1;
    transform: translateY(0);
}

.result.correct {
    background: #c6f6d5;
    color: #22543d;
    border: 2px solid #48bb78;
}

.result.incorrect {
    background: #fed7d7;
    color: #742a2a;
    border: 2px solid #f56565;
}

.hint-section {
    text-align: center;
}

.hint-btn {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.hint-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(237, 137, 54, 0.3);
}

.hint-text {
    background: #fffaf0;
    border: 2px solid #ed8936;
    border-radius: 8px;
    padding: 15px;
    color: #744210;
    font-style: italic;
    display: none;
}

.hint-text.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Cipher information styling - blue theme */
.hint-text.cipher-info {
    background: #e3f2fd;
    border: 2px solid #1976d2;
    color: #0d47a1;
}

/* Frequent letters styling - green theme */
.hint-text.freq-letters {
    background: #e8f5e8;
    border: 2px solid #388e3c;
    color: #1b5e20;
}

/* Keep original orange theme for hints */
.hint-text.hint {
    background: #fffaf0;
    border: 2px solid #ed8936;
    color: #744210;
}

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

.stat-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.stat-card i {
    font-size: 1.5rem;
    color: #667eea;
}

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

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
}

.stat-label {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.bounce {
    animation: bounce 0.6s ease;
}

/* Dashboard Styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 2px solid #e2e8f0;
}

.dashboard-card h2 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.large-profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #667eea;
}

.profile-details h3 {
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.profile-details p {
    color: #718096;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.preference-item {
    margin-bottom: 15px;
}

.preference-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4a5568;
    font-weight: 500;
}

.preference-item select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    margin-top: 5px;
    width: 100%;
}

.save-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.3);
}

.leaderboard-list {
    max-height: 300px;
    overflow-y: auto;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.rank {
    font-weight: 700;
    color: #667eea;
    min-width: 30px;
}

.name {
    flex: 1;
    font-weight: 500;
    color: #2d3748;
}

.score {
    color: #48bb78;
    font-weight: 600;
}

.accuracy {
    color: #718096;
    font-size: 0.9rem;
}

.quick-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

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

.action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.action-btn.secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.action-btn.hint {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
}

.action-btn.info {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
}

.action-btn-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.loading {
    text-align: center;
    color: #718096;
    font-style: italic;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .cipher-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .cipher-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group input {
        min-width: auto;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-info {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        flex-direction: column;
    }
}

/* Tutorial Styles */
.tutorials-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
}

.tutorials-intro {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.6;
}

.tutorial-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.tutorial-btn {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 15px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.tutorial-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.tutorial-btn.active {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 10px 25px rgba(79, 172, 254, 0.4);
}

.tutorial-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.tutorial-btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

.tutorial-btn i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.tutorial-btn span {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.tutorial-btn small {
    font-size: 12px;
    opacity: 0.8;
}

.tutorial-content {
    position: relative;
}

.tutorial-lesson {
    display: none;
}

.tutorial-lesson.active {
    display: block;
}

.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.lesson-header h3 {
    color: #333;
    font-size: 28px;
    font-weight: 700;
}

.lesson-meta {
    display: flex;
    gap: 15px;
    align-items: center;
}

.difficulty {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.difficulty.beginner {
    background: #e8f5e8;
    color: #2d5a2d;
}

.duration {
    color: #666;
    font-size: 14px;
}

.lesson-content {
    line-height: 1.8;
}

.lesson-section {
    margin-bottom: 40px;
}

.lesson-section h4 {
    color: #333;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
}

.lesson-section h5 {
    color: #4a5568;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.lesson-section p {
    color: #666;
    margin-bottom: 15px;
}

.lesson-section ol, .lesson-section ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.lesson-section li {
    margin-bottom: 8px;
    color: #666;
}

.example-box {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    border-left: 5px solid #ff6b6b;
}

.cipher-demo {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin: 20px 0;
    border: 2px solid #e9ecef;
}

.alphabet-demo {
    margin: 15px 0;
}

.alphabet-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
}

.alphabet-row .label {
    min-width: 80px;
    font-weight: 600;
    color: #495057;
}

.alphabet-row .letters {
    letter-spacing: 3px;
    font-weight: 500;
}

.word-example {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.word-example p {
    margin-bottom: 5px;
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

.strategy-steps {
    display: grid;
    gap: 20px;
    margin: 25px 0;
}

.step {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border-left: 5px solid #667eea;
}

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

.step-content h5 {
    margin-bottom: 8px;
    color: #333;
}

.step-content p {
    margin: 0;
    color: #666;
}

.practice-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 20px;
    margin: 25px 0;
    text-align: center;
}

.cipher-text {
    font-size: 32px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    margin-bottom: 25px;
    letter-spacing: 5px;
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.practice-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.practice-controls input {
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    min-width: 200px;
    text-align: center;
    text-transform: uppercase;
}

.practice-btn {
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid white;
    color: white;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.practice-btn:hover {
    background: white;
    color: #667eea;
}

.practice-result {
    min-height: 30px;
    font-weight: 600;
    font-size: 18px;
}

.practice-result.correct {
    color: #4ade80;
}

.practice-result.incorrect {
    color: #f87171;
}

.practice-hint {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    backdrop-filter: blur(5px);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.tip {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-top: 5px solid #667eea;
    text-align: center;
}

.tip i {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 15px;
}

.tip h5 {
    color: #333;
    margin-bottom: 10px;
}

.tip p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

.start-practice-btn {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
    border: none;
    padding: 20px 40px;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

.start-practice-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(74, 222, 128, 0.4);
}

.coming-soon-content {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.coming-soon-content i {
    font-size: 64px;
    color: #667eea;
    margin-bottom: 25px;
}

.coming-soon-content h3 {
    color: #333;
    margin-bottom: 15px;
}

.tutorial-schedule {
    display: grid;
    gap: 15px;
    max-width: 400px;
    margin: 30px auto 0;
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 5px solid #667eea;
}

.schedule-item .date {
    font-weight: 600;
    color: #667eea;
}

.schedule-item .cipher {
    color: #333;
}

@media (max-width: 768px) {
    .tab-navigation {
        flex-direction: column;
    }
    
    .tutorial-nav {
        grid-template-columns: 1fr;
    }
    
    .lesson-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .practice-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .practice-controls input {
        min-width: auto;
        width: 100%;
        max-width: 300px;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .alphabet-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .alphabet-row .letters {
        font-size: 12px;
        letter-spacing: 1px;
    }
}

/* Baconian Cipher Tutorial Specific Styles */
.baconian-table {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.baconian-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
    justify-content: center;
}

.baconian-row .letter {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 14px;
    background: white;
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
    min-width: 80px;
    text-align: center;
    color: #495057;
}

@media (max-width: 768px) {
    .baconian-row {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .baconian-row .letter {
        min-width: auto;
        width: 100%;
        max-width: 200px;
    }
}

/* FAQ Section Styles */
.faq-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin: 40px 0 20px;
}

.faq-section h2 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
}

.faq-intro {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: white;
}

.faq-item summary {
    padding: 20px;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: 600;
    color: #333;
    font-size: 16px;
    border: none;
    outline: none;
    transition: background-color 0.3s ease;
}

.faq-item summary:hover {
    background: #e9ecef;
}

.faq-item[open] summary {
    background: #667eea;
    color: white;
}

.faq-item p {
    padding: 20px;
    margin: 0;
    color: #666;
    line-height: 1.6;
    border-top: 1px solid #e0e0e0;
}

@media (max-width: 768px) {
    .faq-section {
        margin: 20px 0;
        padding: 20px;
    }
    
    .faq-item summary {
        padding: 15px;
        font-size: 14px;
    }
    
    .faq-item p {
        padding: 15px;
        font-size: 14px;
    }
}

/* Binary tutorial styles */
.binary-demo {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.binary-positions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.position {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    padding: 8px 6px;
    border-radius: 4px;
    border: 2px solid #e0e7ff;
    min-width: 50px;
}

.bit-value {
    font-weight: 600;
    color: #4f46e5;
    font-size: 14px;
}

.bit-power {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}

.binary-breakdown {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin: 10px 0;
}

.bit {
    background: #4f46e5;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.ascii-table {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    margin: 15px 0;
}

.ascii-row {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    padding: 12px 15px;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
}

.ascii-row.header {
    background: #4f46e5;
    color: white;
    font-weight: 600;
}

.ascii-row:nth-child(even):not(.header) {
    background: white;
}

.ascii-note {
    font-style: italic;
    color: #6b7280;
    text-align: center;
    margin-top: 10px;
}

.decoding-steps {
    background: #f0f9ff;
    border-left: 4px solid #0ea5e9;
    padding: 20px;
    margin: 15px 0;
}

.step-example {
    background: #fef3c7;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.decode-step {
    display: flex;
    align-items: center;
    margin: 8px 0;
    gap: 10px;
}

.step-num {
    background: #f59e0b;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.step-text code {
    background: #1f2937;
    color: #f9fafb;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.advanced-ascii {
    background: #fef7ff;
    border: 1px solid #e879f9;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.difficulty.intermediate {
    background: #f59e0b;
    color: white;
}

.practice-hint {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
}

.practice-hint p {
    margin: 5px 0;
    color: #856404;
}

/* Mobile responsiveness for binary tutorial */
@media (max-width: 768px) {
    .binary-positions {
        gap: 4px;
    }
    
    .position {
        min-width: 40px;
        padding: 6px 4px;
    }
    
    .bit-value {
        font-size: 12px;
    }
    
    .bit-power {
        font-size: 9px;
    }

    .ascii-row {
        grid-template-columns: 1fr 1fr 1.5fr;
        padding: 8px 10px;
        font-size: 14px;
    }
}

/* Engineering Articles Tab Styles */
.engineering-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 40px 50px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.engineering-intro {
    font-size: 1.1rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 40px;
    text-align: center;
}

.articles-preview {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.featured-article {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 2px solid #667eea;
    border-radius: 15px;
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.article-badge {
    position: absolute;
    top: -1px;
    right: -1px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom-left-radius: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.article-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.article-info h3 {
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.featured-article .article-meta {
    display: flex;
    gap: 15px;
    align-items: center;
}

.reading-time {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.article-description {
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 20px;
}

.article-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.article-topics .topic {
    background: #e0e7ff;
    color: #4338ca;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.article-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.read-article-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.read-article-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.bookmark-btn {
    width: 44px;
    height: 44px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bookmark-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: scale(1.1);
}

.bookmark-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.articles-categories h3 {
    color: #1f2937;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.category-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.category-card.coming-soon {
    opacity: 0.7;
    background: #f8f9fa;
}

.category-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin: 0 auto 15px auto;
}

.category-card.coming-soon .category-icon {
    background: #d1d5db;
}

.category-card h4 {
    color: #1f2937;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.category-card p {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.category-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-count,
.difficulty-range {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}

.article-count {
    background: #dbeafe;
    color: #1e40af;
}

.difficulty-range {
    background: #fef3c7;
    color: #d97706;
}

.coming-soon-badge {
    background: #f3f4f6;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.engineering-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    color: white;
}

.cta-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.cta-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 25px;
    line-height: 1.6;
}

.view-all-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.view-all-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Mobile responsiveness for engineering tab */
@media (max-width: 768px) {
    .engineering-section {
        padding: 25px 20px;
    }
    
    .featured-article {
        padding: 20px;
    }
    
    .article-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .article-icon {
        margin: 0 auto;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .engineering-cta {
        padding: 30px 20px;
    }
    
    .cta-content h3 {
        font-size: 1.5rem;
    }
} 