* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #232526 0%, #414345 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><rect width="20" height="20" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></svg>') repeat;
    pointer-events: none;
}

.container {
    max-width: 680px;
    margin: 40px auto 0 auto;
    background: #23272f;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(77,159,255,0.10), 0 1.5px 8px rgba(0,0,0,0.10);
    padding: 32px 20px 24px 20px;
    color: #fff;
    position: relative;
}

.container:hover {
    transform: translateY(-5px);
}

h1 {
    text-align: center;
    color: #4d9fff;
    font-size: 2.2em;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    font-weight: 700;
}

.subjects-container {
    background: #1e2128;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(77,159,255,0.08);
    padding: 24px 20px;
    margin-bottom: 22px;
    border: 1px solid #2d2d2d;
}

.subject-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
    padding: 16px;
    background: #23272f;
    border-radius: 10px;
    border: 1px solid #383838;
    transition: all 0.2s ease;
}

.subject-item:hover {
    border-color: #4d9fff55;
    box-shadow: 0 2px 12px rgba(77,159,255,0.05);
    transform: translateY(-1px);
}

.subject-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.subject-name-row input {
    background: #1e2128;
    border: 1px solid #383838;
    padding: 10px 14px;
    border-radius: 8px;
    width: calc(100% - 50px);
    color: #fff;
    font-size: 0.95em;
    transition: all 0.2s ease;
}

.marks-row {
    background: #1e2128;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #383838;
}

.marks-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.marks-group .obtained-marks,
.marks-group .total-marks {
    background: #23272f;
    border: 1px solid #383838;
    padding: 8px 12px;
    border-radius: 6px;
    color: #fff;
    transition: all 0.2s ease;
}
.marks-group .obtained-marks {
    width: 90%; /* Reduced width */
    padding: 8px 10px;
}

.marks-group .total-marks {
    width: auto; /* Let it take natural width */
    min-width: 70px; /* Ensure minimum width for content */
    margin-left: -5px; /* Pull it slightly to the left */
}
.marks-group .obtained-marks:focus,
.marks-group .total-marks:focus,
.subject-name-row input:focus {
    outline: none;
    border-color: #4d9fff;
    box-shadow: 0 0 0 2px #4d9fff22;
}

.subject-item input, .subject-item select {
    padding: 8px 10px;
    border: 1px solid #4d9fff55;
    border-radius: 7px;
    background: #23272f;
    color: #fff;
    font-size: 1em;
    transition: box-shadow 0.2s;
}

.subject-item input:focus, .subject-item select:focus {
    outline: none;
    box-shadow: 0 0 0 2px #4d9fff55;
}

.subject-number {
    margin-left: 0;
    background: #4d9fff22;
    color: #4d9fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #4d9fff;
    font-weight: 600;
    font-size: 1em;
}

.btn {
    background: #0066cc;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-delete {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #23272f;
    color: #ff4d4d;
    border: 1.5px solid #ff4d4d55;
    font-size: 16px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.btn-delete:hover {
    background: #ff4d4d;
    color: white;
    border-color: #ff4d4d;
    transform: scale(1.1) rotate(90deg);
}

.results {
    margin-top: 18px;
}

.result-item {
    background: #23272f;
    padding: 18px 22px;
    border-radius: 10px;
    border: 1.5px solid #4d9fff55;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    font-weight: 700;
    color: #4d9fff;
    box-shadow: 0 2px 8px rgba(77,159,255,0.08);
    margin-bottom: 0;
    gap: 10px;
}

.result-item span:first-child {
    font-size: 0.9em;
    color: #b0d4ff;
    font-weight: 500;
    margin-right: 8px;
}

.result-item span:last-child {
    font-size: 1.3em;
    color: #fff;
    font-family: 'Consolas', monospace;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.gpa-suggestion {
    font-size: 0.9em;
    color: #b0d4ff;
    margin-top: 10px;
    text-align: center;
    font-style: italic;
    background: #23272f;
    border-radius: 8px;
    padding: 8px 0 0 0;
}

#add-subject {
    width: 100%;
    margin-top: 10px;
}

.university {
    text-align: center;
    color: #b0d4ff;
    font-size: 1.1em;
    margin-bottom: 28px;
    font-weight: 400;
    letter-spacing: 1px;
}

.footer {
    max-width: 680px;
    margin: 32px auto 20px auto;
    text-align: center;
    padding: 20px;
    color: #e0e0e0;
}

.developer-credit {
    color: #66b3ff;
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 20px;
    margin-top: 25px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #23272f;
    transition: all 0.2s;
    border: 1.5px solid #4d9fff22;
    padding: 8px;
}

.social-links a:hover {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 3px 12px rgba(77, 159, 255, 0.15);
    background: #4d9fff22;
}

.social-icon {
    width: 24px;
    height: 24px;
    fill: #4d9fff;
    transition: all 0.2s;
}

/* Specific hover colors for each icon */
.social-links a:hover .social-icon {
    fill: #66b3ff;
}

.social-links a:nth-child(1):hover .social-icon {
    fill: #6cc644; /* GitHub green */
}

.social-links a:nth-child(2):hover .social-icon {
    fill: #0077b5; /* LinkedIn blue */
}

/* Update X hover style to nth-child(3) */
.social-links a:nth-child(3):hover .social-icon {
    fill: #000000; /* X black */
}

.contact-info {
    color: #b0d4ff;
    font-size: 0.9em;
    margin-top: 15px;
}

.contact-info a {
    color: #4d9fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #66b3ff;
}

/* Style for publishing date and version */
.publish-info {
    font-size: 0.85em;
    color: #a0cfff; /* Lighter blue-ish color */
    margin-top: 15px;
    font-style: italic;
}

.about-developer {
    text-align: left;
    margin: 0 auto;
    max-width: 600px;
}

.about-developer summary {
    cursor: pointer;
    color: #4d9fff;
    font-weight: bold;
    padding: 15px;
    border-radius: 12px;
    background: #333333;
    outline: none;
    transition: all 0.3s ease;
    border: 1px solid #404040;
}

.about-developer summary:hover {
    background: #383838;
    transform: translateY(-2px);
}

.about-content {
    padding: 20px;
    background: #333333;
    border-radius: 0 0 12px 12px;
    margin-top: 5px;
    border: 1px solid #404040;
    color: #e0e0e0;
}

.about-content p {
    margin: 10px 0;
    line-height: 1.6;
    color: #e0e0e0;
}

.contact {
    margin-top: 15px;
}

.contact a {
    color: #4d9fff;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.contact a:hover {
    color: #66b3ff;
}

.contact a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(90deg, #4d9fff, #66b3ff);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.contact a:hover::after {
    transform: scaleX(1);
}

.android-app-section {
    margin-top: 20px;
    padding: 20px;
    background: #333333;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #404040;
}

.android-app-section h3 {
    color: #e0e0e0;
    font-size: 1.2em;
    margin-bottom: 15px;
}

.android-app-section .btn {
    display: inline-block;
    margin-top: 10px;
    text-decoration: none;
}

.app-download-section {
    margin-top: 20px;
}

.app-download-section .dropdown-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    cursor: pointer;
    width: auto;
    margin-left: 0;
}

.app-download-section .dropdown-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: #4d9fff;
    font-weight: 600;
    text-align: left;
}

.app-download-section .dropdown-content {
    display: none;
    padding: 10px 0 0 0;
    margin-top: 0;
    text-align: left;
}

.app-download-section.active .dropdown-content {
    display: block;
    animation: slideDown 0.3s ease;
}

.app-download-section .btn {
    display: inline-block;
    margin: 0;
    font-size: 1em;
    padding: 8px 24px;
    background: linear-gradient(90deg, #4d9fff 60%, #66b3ff 100%);
    border: none;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(77,159,255,0.08);
    transition: all 0.2s;
}

.app-download-section .btn:hover {
    background: #4d9fff;
    transform: translateY(-1px) scale(1.04);
}

/* CGPA Section Styles */
.toggle-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
}

.toggle-section .btn {
    width: 220px;
    font-size: 1.08em;
    padding: 12px 0;
    border-radius: 8px;
    margin-bottom: 0;
    background: linear-gradient(90deg, #4d9fff 60%, #66b3ff 100%);
    color: #fff;
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(77,159,255,0.08);
    transition: all 0.2s;
    position: relative;
    outline: none;
}

.toggle-section .btn.active {
    background: linear-gradient(90deg, #4d9fff 60%, #66b3ff 100%);
    color: #fff;
    transform: scale(1.05);
    position: relative;
}

.toggle-section .btn.active::after {
    content: '►';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1em;
    color: #fff;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.toggle-section .btn:not(.active) {
    background: #23272f;
    color: #4d9fff;
    border: 1.5px solid #4d9fff;
    box-shadow: none;
}

#cgpa-section {
    margin-top: 30px;
}

.cgpa-calc-box {
    background: #23272f;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(77,159,255,0.07);
    padding: 22px 16px 18px 16px;
    margin-bottom: 18px;
    border: 1px solid #2d2d2d;
}

.cgpa-calc-box h2 {
    color: #87CEEB;
    font-size: 1.25em;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    border-left: 4px solid #4d9fff;
    padding-left: 10px;
    background: none;
}

.cgpa-detail-line {
    color: #b0d4ff;
    font-size: 1em;
    margin-bottom: 12px;
    padding-left: 14px;
}

#add-gpa-btn, #calc-cgpa-btn, #calc-updated-cgpa-btn {
    margin: 10px 10px 10px 0;
}

#gpa-list {
    margin-bottom: 10px;
}

.gpa-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.gpa-input-row input[type="number"] {
    width: 100px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #4d9fff55;
    background: #23272f;
    color: #fff;
    font-size: 1em;
}

.gpa-input-row .btn-delete {
    width: 28px;
    height: 28px;
    font-size: 18px;
    background: #23272f;
    color: #ff4d4d;
    border: 1.5px solid #ff4d4d55;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.gpa-input-row .btn-delete:hover {
    background: #ff4d4d;
    color: #fff;
    border-color: #ff4d4d;
}

.update-cgpa-fields {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.update-cgpa-fields input[type="number"] {
    width: 110px;
    padding: 7px 8px;
    border-radius: 8px;
    border: 1px solid #4d9fff55;
    background: #23272f;
    color: #fff;
    font-size: 1em;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 25px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.dropdown-toggle.active,
.dropdown-toggle:focus {
    background: #4d9fff;
    color: #fff;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background: #222c3a;
    min-width: 260px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    border-radius: 10px;
    z-index: 100;
    top: 110%;
    left: 0;
    padding: 10px 0;
    border: 1px solid #404040;
}

.dropdown.open .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px);}
    to { opacity: 1; transform: translateY(0);}
}

.dropdown-item {
    background: none;
    border: none;
    color: #4d9fff;
    padding: 12px 24px;
    width: 100%;
    text-align: left;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.dropdown-item:hover {
    background: #4d9fff;
    color: #fff;
}

/* Add these new styles */
.subject-count-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
    width: 100%;
}

.subject-count-input {
    flex: 1 1 70%;
    padding: 10px 14px;
    border: 1.5px solid #4d9fff;
    border-radius: 8px;
    background: #23272f;
    color: #fff;
    font-size: 1em;
    transition: box-shadow 0.2s;
}

.subject-count-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #4d9fff55;
}

.btn-transparent {
    flex: 0 0 30%;
    background: transparent;
    border: 1.5px solid #4d9fff;
    color: #4d9fff;
    padding: 8px 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-transparent:hover {
    background: #4d9fff22;
    transform: translateY(-1px);
}

/* Dropdown Component Styles */
.dropdown {
    position: relative;
    cursor: pointer;
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px 0;
}

.dropdown-header h3 {
    color: #4d9fff;
    font-size: 1em;
    font-weight: normal;
    margin: 0;
}

.dropdown-arrow {
    color: #4d9fff;
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    padding: 15px;
    margin-top: 5px;
    width: 300px;  /* Match header width */
}

.dropdown.active .dropdown-content {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { 
        opacity: 0;
        transform: translateY(-10px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive Styles */
@media screen and (max-width: 600px) {
    .container, .footer {
        max-width: 98vw;
        padding: 10px 2vw;
    }
    .toggle-section .btn {
        width: 98vw;
        min-width: 180px;
        font-size: 1em;
    }
    .cgpa-calc-box, .subjects-container {
        padding: 12px 4vw;
    }
    .result-item {
        padding: 12px 4vw;
        font-size: 1.1em;
    }
}

/* Style for the new app download section in footer */
.app-download-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding: 10px;
    background-color: rgba(77, 159, 255, 0.1); /* Subtle background */
    border-radius: 8px;
}

.app-download-footer span {
    color: #b0d4ff;
    font-size: 0.95em;
}

.app-download-footer a {
    display: inline-flex; /* Align icon nicely */
    transition: transform 0.2s ease;
}

.app-download-footer a:hover {
    transform: scale(1.1);
}

.android-icon-footer {
    width: 28px; /* Slightly larger icon */
    height: 28px;
    fill: #3DDC84; /* Android green */
}
