/* Author: Tim Smith */
/* Note: All Code owned by Tim */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --danger-color: #f56565;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --border-color: #e2e8f0;
}

* {
    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, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-dark);
}

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

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 20px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.95;
}

.form-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    margin-bottom: 30px;
}

.section {
    margin-bottom: 35px;
}

.section h2 {
    color: var(--secondary-color);
    font-size: 1.5em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color);
}

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

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

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 0.95em;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.checkbox-group span {
    font-weight: normal;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn {
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-light);
}

.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.results-section {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    margin-top: 30px;
}

.results-header {
    margin-bottom: 30px;
}

.results-header h2 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.profile-summary {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.profile-summary p {
    margin: 5px 0;
    color: var(--text-dark);
}

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

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 1em;
    opacity: 0.95;
}

.download-section {
    margin: 40px 0;
    padding: 25px;
    background: var(--bg-light);
    border-radius: 10px;
}

.download-section h3 {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.download-btn {
    padding: 12px 25px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.download-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.scholarships-list {
    margin-top: 30px;
}

.scholarship-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

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

.scholarship-card.priority-high {
    border-left: 5px solid var(--success-color);
    background: rgba(72, 187, 120, 0.05);
}

.scholarship-card.priority-medium {
    border-left: 5px solid var(--warning-color);
    background: rgba(237, 137, 54, 0.05);
}

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

.scholarship-title {
    font-size: 1.3em;
    color: var(--text-dark);
    font-weight: 700;
}

.priority-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
}

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

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.85em;
    color: var(--text-light);
    margin-bottom: 5px;
}

.detail-value {
    font-weight: 600;
    color: var(--text-dark);
}

.deadline-urgent {
    color: var(--danger-color);
    font-weight: 700;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge-low { background: #c6f6d5; color: #22543d; }
.badge-medium { background: #feebc8; color: #7c2d12; }
.badge-high { background: #fed7d7; color: #742a2a; }
.badge-very-high { background: #fc8181; color: white; }

.scholarship-notes {
    margin-top: 15px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 8px;
    font-size: 0.95em;
    color: var(--text-dark);
}

.apply-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.apply-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

footer {
    text-align: center;
    color: white;
    padding: 30px 20px;
    margin-top: 40px;
}

footer a {
    color: white;
    text-decoration: underline;
}

/* Alert signup section */
.alert-signup-section {
    background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.08));
    border: 2px solid rgba(102,126,234,0.3);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    text-align: center;
}

.alert-signup-section h3 {
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.alert-form {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Source badges on scholarship cards */
.source-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

.source-database { background: #e2e8f0; color: #4a5568; }
.source-careeronestop { background: #bee3f8; color: #2b6cb0; }
.source-ai { background: #e9d8fd; color: #553c9a; }

/* Popular Chips */
.popular-chips {
    margin-bottom: 1rem;
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.chip {
    background: #e5e7eb;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.chip:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    /* Prevent zoom on input focus (iOS) */
    input, select, textarea {
        font-size: 16px !important;
    }

    /* Larger touch targets */
    button, .chip {
        min-height: 44px;
        min-width: 44px;
    }

    .form-card {
        padding: 25px;
        padding-bottom: 80px; /* Space for fixed button */
    }

    header h1 {
        font-size: 2em;
    }

    /* Stack form fields */
    .form-row {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    /* Full-width buttons */
    .button-group {
        flex-direction: column;
    }

    .btn,
    button[type="submit"],
    .btn-primary {
        width: 100%;
    }

    /* Compact summary cards */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card h3 {
        font-size: 1.5rem;
    }

    .stat-card p {
        font-size: 0.9em;
    }

    /* Sticky submit button */
    .submit-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 100;
    }

    /* Compact scholarship cards on mobile */
    .scholarship-card {
        padding: 1rem;
    }

    .scholarship-card h3 {
        font-size: 1.1rem;
    }

    .scholarship-header {
        flex-direction: column;
        gap: 10px;
    }

    .scholarship-title {
        font-size: 1.1em;
    }

    .scholarship-details {
        grid-template-columns: 1fr;
    }
}
