/* Tool-specific styles only - base styles are in tool-layout.css */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0a0a0a;
    color: #e5e7eb;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #141414;
    border-bottom: 1px solid #374151;
    z-index: 100;
}

    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

    margin-top: 60px;
    padding: 48px 24px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    max-width: 720px;
    margin: 0 auto;
}

.tool-main {
    flex: 1;
    padding: 32px 24px 120px;
}

.tool-container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.input-group > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.scale-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scale-selector label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.select-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    transition: border-color 150ms ease;
}

.select-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.select-input option {
    background-color: #1a1a1a;
}

.text-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 150ms ease;
}

.text-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.text-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.text-input::placeholder {
    color: #6b7280;
}

input[type="number"].text-input {
    -moz-appearance: textfield;
}

input[type="number"].text-input::-webkit-outer-spin-button,
input[type="number"].text-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.setting-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.setting-content > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.courses-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.courses-header label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.course-counter {
    font-size: 13px;
    color: #6b7280;
}

.course-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.course-card {
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 16px;
    position: relative;
    transition: border-color 150ms ease;
}

.course-card:hover {
    border-color: #374151;
}

.course-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.course-card-number {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

.course-remove-btn {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 18px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 150ms ease;
    line-height: 1;
}

.course-remove-btn:hover {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

.course-card-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.course-name-field {
    width: 100%;
}

.course-name-field .text-input {
    width: 100%;
}

.course-grade-credits {
    display: flex;
    gap: 12px;
}

.course-grade-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.course-credits-field {
    flex: 0 0 120px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.course-grade-field label,
.course-credits-field label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}

.course-grade-field .select-input,
.course-credits-field .text-input {
    width: 100%;
}

.course-limit-msg {
    font-size: 13px;
    color: #f59e0b;
    padding: 8px 12px;
    background-color: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 6px;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.button-primary {
    background-color: #3b82f6;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
    flex: 1;
}

.button-secondary {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #374151;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.output-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.output-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.output-title {
    font-size: 18px;
    font-weight: 500;
    color: #d1d5db;
}

.gpa-result-card {
    text-align: center;
    padding: 32px 24px;
    background-color: #0a0a0a;
    border: 1px solid #374151;
    border-radius: 8px;
}

.gpa-result-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.gpa-result-value {
    font-size: 48px;
    font-weight: 700;
    color: #3b82f6;
    line-height: 1.1;
    margin-bottom: 8px;
    transition: color 300ms ease;
}

.gpa-result-credits {
    font-size: 14px;
    color: #9ca3af;
}

.gpa-result-value.gpa-high {
    color: #10b981;
}

.gpa-result-value.gpa-mid {
    color: #3b82f6;
}

.gpa-result-value.gpa-low {
    color: #f59e0b;
}

.gpa-result-value.gpa-danger {
    color: #ef4444;
}

.grade-distribution {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.grade-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.grade-bar-label {
    flex: 0 0 32px;
    font-size: 13px;
    font-weight: 600;
    color: #e5e7eb;
    text-align: right;
}

.grade-bar-track {
    flex: 1;
    height: 24px;
    background-color: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.grade-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 400ms ease;
    min-width: 2px;
}

.grade-bar-fill.grade-a { background-color: #10b981; }

.grade-bar-fill.grade-a-minus { background-color: #34d399; }

.grade-bar-fill.grade-b-plus { background-color: #3b82f6; }

.grade-bar-fill.grade-b { background-color: #60a5fa; }

.grade-bar-fill.grade-b-minus { background-color: #93c5fd; }







.grade-bar-fill.grade-f { background-color: #ef4444; }

.grade-bar-pct {
    flex: 0 0 44px;
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    text-align: right;
}

.breakdown-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.breakdown-table thead th {
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    background-color: #1a1a1a;
    border-bottom: 1px solid #374151;
    position: sticky;
    top: 0;
}

.breakdown-table thead th.col-numeric {
    text-align: right;
}

.breakdown-table tbody td {
    padding: 10px 12px;
    color: #e5e7eb;
    border-bottom: 1px solid #1f1f1f;
}

.breakdown-table tbody tr:nth-child(odd) {
    background-color: #141414;
}

.breakdown-table tbody tr:nth-child(even) {
    background-color: #1a1a1a;
}

.breakdown-table tbody td.col-numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.breakdown-table tfoot td {
    padding: 10px 12px;
    font-weight: 600;
    color: #ffffff;
    border-top: 1px solid #374151;
    background-color: #1a1a1a;
}

.breakdown-table tfoot td.col-numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.copy-actions {
    display: flex;
    justify-content: flex-end;
}

.pro-section {
    padding-top: 24px;
    border-top: 1px solid #374151;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pro-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pro-badge {
    color: #0a0a0a;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.pro-feature {
    position: relative;
    opacity: 0.6;
}

.pro-feature.unlocked {
    opacity: 1;
}

.pro-gated {
    opacity: 0.5;
    cursor: not-allowed;
}

.pro-gated.unlocked {
    opacity: 1;
    cursor: pointer;
}

.cumulative-gpa {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 16px;
    background-color: #0a0a0a;
    border: 1px solid #374151;
    border-radius: 8px;
}

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

.cumulative-value {
    font-size: 28px;
    font-weight: 700;
    color: #3b82f6;
}

.cumulative-credits {
    font-size: 13px;
    color: #9ca3af;
    margin-left: auto;
}

.semester-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.semester-card {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 150ms ease;
}

.semester-card.active {
    border-color: #3b82f6;
}

.semester-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 150ms ease;
}

.semester-card-header:hover {
    background-color: #222222;
}

.semester-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.semester-card-name {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.semester-card-meta {
    font-size: 12px;
    color: #6b7280;
}

.semester-card-gpa {
    font-size: 18px;
    font-weight: 600;
    color: #3b82f6;
}

.semester-card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms ease;
}

.semester-card.expanded .semester-card-body {
    max-height: 600px;
}

.semester-card-content {
    padding: 0 16px 16px;
    border-top: 1px solid #2a2a2a;
}

.semester-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.semester-card-actions button {
    font-size: 13px;
    padding: 6px 12px;
}

.target-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.target-input-row {
    display: flex;
    gap: 12px;
}

.target-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.target-field label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}

.target-field .text-input {
    width: 100%;
}

.target-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background-color: #0a0a0a;
    border: 1px solid #374151;
    border-radius: 8px;
}

.target-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.target-result-label {
    font-size: 14px;
    color: #9ca3af;
}

.target-result-value {
    font-size: 16px;
    font-weight: 600;
    color: #e5e7eb;
}

.target-status {
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.target-status.achievable {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.target-status.not-achievable {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.custom-scale-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.custom-scale-name-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.custom-scale-name-row label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}

.custom-scale-grades {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.custom-grade-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-grade-label {
    flex: 0 0 40px;
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.custom-grade-input {
    flex: 1;
}

.custom-grade-input .text-input {
    width: 100%;
}

.custom-scale-actions {
    display: flex;
    gap: 12px;
}

.custom-scale-actions .button-primary,
.custom-scale-actions .button-secondary {
    flex: 1;
}

.saved-scales {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.saved-scales > label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}

.saved-scales-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.saved-scale-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    transition: border-color 150ms ease;
}

.saved-scale-item:hover {
    border-color: #374151;
}

.saved-scale-name {
    font-size: 14px;
    color: #e5e7eb;
    cursor: pointer;
}

.saved-scale-name:hover {
    color: #3b82f6;
}

.saved-scale-delete {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    transition: color 150ms ease;
}

.saved-scale-delete:hover {
    color: #ef4444;
}

.pro-cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.pro-cta-text {
    font-size: 14px;
    color: #d1d5db;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.modal-overlay.modal-hidden {
    display: none;
}

.modal-overlay.modal-visible {
    display: flex;
}

.modal {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 0;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #e5e7eb;
}

.modal-content {
    padding: 24px;
}

.pro-features-list {
    margin-bottom: 24px;
}

.pro-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.feature-check {
    width: 20px;
    height: 20px;
    background-color: #059669;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.feature-text {
    font-size: 15px;
    color: #e5e7eb;
}

.modal-cta {
    width: 100%;
    display: block;
}

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 300;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    animation: toast-in 200ms ease;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.footer {
    background-color: #0a0a0a;
    border-top: 1px solid #374151;
    padding: 32px 24px;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 14px;
    color: #6b7280;
}

.error-message {
    background-color: #7f1d1d;
    border: 1px solid #dc2626;
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

.success-message {
    background-color: #064e3b;
    border: 1px solid #059669;
    color: #6ee7b7;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

.modal-hidden {
    display: none;
}

@media (max-width: 768px) {
        padding: 32px 16px;
    }

        font-size: 28px;
        line-height: 36px;
    }

        font-size: 14px;
    }

    .tool-main {
        padding: 24px 16px 100px;
    }

    .tool-container {
        gap: 32px;
    }

    .output-section {
        padding: 16px;
    }

    .gpa-result-card {
        padding: 24px 16px;
    }

    .gpa-result-value {
        font-size: 40px;
    }

    .course-grade-credits {
        flex-direction: column;
    }

    .course-credits-field {
        flex: auto;
    }

    .action-buttons {
        flex-direction: column;
    }

    .button-primary,
    .button-secondary {
        width: 100%;
    }

    .target-input-row {
        flex-direction: column;
    }

    .cumulative-gpa {
        flex-wrap: wrap;
    }

    .cumulative-credits {
        margin-left: 0;
        width: 100%;
    }

    .custom-scale-actions {
        flex-direction: column;
    }

    .pro-cta-content {
        flex-direction: column;
        gap: 10px;
    }

        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .semester-card-header {
        padding: 10px 12px;
    }

    .grade-bar-label {
        flex: 0 0 28px;
        font-size: 12px;
    }

    .grade-bar-pct {
        flex: 0 0 38px;
        font-size: 12px;
    }

    .breakdown-table {
        font-size: 13px;
    }

    .breakdown-table thead th,
    .breakdown-table tbody td,
    .breakdown-table tfoot td {
        padding: 8px;
    }
}