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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-left: 30px;
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #667eea;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
    z-index: 1001;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: #495057;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
    background-color: #f8f9fa;
    color: #667eea;
}

.section {
    display: none;
    padding-top: 80px;
    padding-bottom: 20px;
    min-height: 100vh;
}

.section.active {
    display: block;
}

main {
    padding: 0 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 30px 20px 20px;
    font-size: 2.5rem;
    font-weight: 700;
}

.subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    padding-bottom: 20px;
}

.grading-scale {
    padding: 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.grading-scale h3 {
    margin-bottom: 15px;
    color: #495057;
    font-size: 1.2rem;
}

.scale-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.scale-grid span {
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: #495057;
    border: 2px solid #e9ecef;
}

.semester-section {
    padding: 30px;
}

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

.semester-header h2 {
    color: #495057;
    font-size: 1.8rem;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

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

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

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

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

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.semester-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 2px solid #e9ecef;
}

.semester-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.semester-title h3 {
    color: #495057;
    font-size: 1.4rem;
}

.semester-gpa {
    background: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    color: #667eea;
    border: 2px solid #667eea;
}

.subject-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 15px;
    margin-bottom: 15px;
    font-weight: 600;
    color: #495057;
}

.subject-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 15px;
    margin-bottom: 10px;
    align-items: center;
}

.input-field {
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: #667eea;
}

.grade-select {
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.grade-select:focus {
    outline: none;
    border-color: #667eea;
}

.remove-subject {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.remove-subject:hover {
    background: #c82333;
}

.semester-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

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

.result-card h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    opacity: 0.9;
}

.cgpa-display, .credits-display {
    font-size: 2.5rem;
    font-weight: 700;
}

.download-section {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.btn-download {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    font-size: 16px;
    padding: 15px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.home-content {
    padding: 30px;
}

.home-content h2 {
    color: #495057;
    margin-bottom: 20px;
}

.home-content ul {
    list-style-type: none;
    padding: 0;
}

.home-content li {
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
}

.home-content li:before {
    content: "✓ ";
    color: #28a745;
    font-weight: bold;
}

.content-section {
    padding: 30px;
    background: white;
    border-radius: 15px;
    margin: 20px 0;
}

.content-section h3 {
    color: #495057;
    margin: 20px 0 10px 0;
}

.content-section p {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 15px;
}

.content-section ul {
    color: #6c757d;
}

.content-section li {
    margin-bottom: 8px;
}

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

.contact-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.contact-item h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid #e9ecef;
}

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

.footer p {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 10px 20px;
    }
    
    .nav-menu {
        margin-top: 10px;
    }
    
    .nav-item {
        margin-left: 20px;
    }
    
    .section {
        padding-top: 120px;
    }
    
    .container {
        margin: 10px;
        border-radius: 10px;
    }
    
    .title {
        font-size: 2rem;
        padding: 20px;
    }
    
    .semester-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .subject-header, .subject-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .results {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .scale-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
