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

.password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.password-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.password-container h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.8rem;
}

.password-container p {
    margin-bottom: 25px;
    color: #fff;
    font-size: 1rem;
}

.password-container input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-align: center;
    font-family: monospace;
    letter-spacing: 2px;
}

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

.password-container .btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.password-error {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 15px;
    font-weight: 500;
}

.password-success {
    color: #28a745;
    font-size: 0.9rem;
    margin-top: 15px;
    font-weight: 500;
}

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

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

header {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.tabs {
    display: flex;
    background: white;
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tab-button {
    flex: 1;
    background: none;
    border: none;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #212529;
}

.tab-button:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #212529;
}

.tab-button.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.tab-content {
    display: none;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

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

.controls {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    margin-bottom: 30px;
    align-items: end;
}

.filter-group,
.search-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label,
.search-group label {
    font-weight: 600;
    color: #212529;
}

.filter-group select,
.search-group input {
    padding: 10px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.filter-group select:focus,
.search-group input:focus {
    outline: none;
    border-color: #667eea;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.subject-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border-left: 5px solid #ddd;
    transition: all 0.3s ease;
    cursor: pointer;
}

.subject-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.subject-card.completed {
    border-left-color: #28a745;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
}

.subject-card.in-progress {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
}

.subject-card.not-started {
    border-left-color: #6c757d;
}

.subject-card.blocked {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    opacity: 0.7;
}

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

.subject-code {
    font-weight: bold;
    font-size: 1.1rem;
    color: #212529;
}

.subject-credits {
    background: #495057;
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.subject-name {
    font-size: 1rem;
    color: #495057;
    margin-bottom: 15px;
}

.subject-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.status-buttons {
    display: flex;
    gap: 5px;
}

.status-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.status-btn.active {
    color: white;
}

.status-btn.completed.active {
    background: #28a745;
}

.status-btn.in-progress.active {
    background: #e6a800;
    color: #000;
}

.status-btn.not-started.active {
    background: #495057;
    color: white;
}

.status-btn:not(.active) {
    background: #dee2e6;
    color: #212529;
}

.status-btn:not(.active):hover {
    background: #ced4da;
    color: #000;
}

.prereqs {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #495057;
}

.prereq-tag {
    display: inline-block;
    background: #dee2e6;
    color: #212529;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 5px;
    margin-bottom: 3px;
    font-size: 0.75rem;
}

.prereq-tag.completed {
    background: #d4edda;
    color: #155724;
}

.prereq-tag.missing {
    background: #f5c6cb;
    color: #721c24;
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 25px;
}

.certificate-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

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

.certificate-name {
    font-size: 1.3rem;
    font-weight: bold;
}

.certificate-progress {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: white;
}

.certificate-subjects {
    margin-bottom: 20px;
}

.certificate-subjects h4 {
    margin-bottom: 10px;
    opacity: 0.9;
}

.subject-requirement {
    display: inline-block;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 12px;
    margin: 2px;
    font-size: 0.8rem;
    color: white;
}

.subject-requirement.completed {
    background: rgba(40, 167, 69, 0.9);
    color: white;
}

.certificate-actions {
    display: flex;
    gap: 10px;
}

.cert-btn {
    padding: 10px 20px;
    border: 2px solid white;
    background: transparent;
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

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

.cert-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cert-btn.requested {
    background: #e6a800;
    border-color: #e6a800;
    color: #000;
}

.cert-btn.received {
    background: #28a745;
    border-color: #28a745;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: #495057;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

.btn-secondary {
    background: #495057;
    color: white;
}

.btn-secondary:hover {
    background: #343a40;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

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

.storage-info,
.edit-info {
    background: #cfe2ff;
    border: 1px solid #6ea8fe;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #212529;
    font-size: 0.9rem;
}

.edit-info code {
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #d73a49;
}

.storage-info,
.edit-info {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #0056b3;
    font-size: 0.9rem;
}

.edit-info code {
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #d73a49;
}

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

.manage-section h2 {
    margin-bottom: 20px;
    color: #212529;
}

.blocked-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

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

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

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

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

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

    .button-group {
        flex-direction: column;
    }

    .tabs {
        flex-direction: column;
        gap: 5px;
    }
}