/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #0A2647;
    background: linear-gradient(135deg, #F4F4F4 0%, #FFFFFF 100%);
    min-height: 100vh;
}

/* Navigation */
.navbar {
    background: #0A2647;
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(10, 38, 71, 0.3);
}

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

.nav-logo h2 {
    color: #FFFFFF;
    font-weight: 700;
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a, .nav-link {
    text-decoration: none;
    color: #FFFFFF;
    font-weight: 500;
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-links a:hover, .nav-link:hover {
    color: #2C9CA6;
}

/* Container and Layout */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 6rem 2rem 2rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-card {
    background: #FFFFFF;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(10, 38, 71, 0.15);
    width: 100%;
    max-width: 500px;
    animation: fadeInUp 0.6s ease;
    border: 1px solid #F4F4F4;
}

.form-card.large {
    max-width: 700px;
}

.form-card h2 {
    color: #0A2647;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    font-weight: 700;
}

.form-card p {
    color: #0A2647;
    opacity: 0.8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #0A2647;
}

input, select, textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #F4F4F4;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background: #FFFFFF;
    color: #0A2647;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #2C9CA6;
    box-shadow: 0 0 0 3px rgba(44, 156, 166, 0.1);
}

select[multiple] {
    height: 120px;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.char-count {
    font-size: 0.875rem;
    color: #0A2647;
    opacity: 0.7;
    text-align: right;
    display: block;
    margin-top: 0.25rem;
}

/* Button Styles */
.btn-primary {
    width: 100%;
    padding: 1rem;
    background: #2C9CA6;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-primary:hover {
    background: #0A2647;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44, 156, 166, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Social Login Styles */
.social-divider {
    text-align: center;
    margin: 2rem 0 1.5rem;
    position: relative;
}

.social-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #F4F4F4;
}

.social-divider span {
    background: #FFFFFF;
    padding: 0 1rem;
    color: #0A2647;
    opacity: 0.7;
    font-size: 0.9rem;
}

.social-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.btn-social {
    flex: 1;
    padding: 0.875rem;
    border: 2px solid #F4F4F4;
    border-radius: 8px;
    background: #FFFFFF;
    color: #0A2647;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 38, 71, 0.1);
    border-color: #2C9CA6;
}

.btn-google:hover {
    border-color: #2C9CA6;
    box-shadow: 0 4px 12px rgba(44, 156, 166, 0.2);
}

.btn-github:hover {
    border-color: #2C9CA6;
    box-shadow: 0 4px 12px rgba(44, 156, 166, 0.2);
}

.btn-linkedin:hover {
    border-color: #2C9CA6;
    box-shadow: 0 4px 12px rgba(44, 156, 166, 0.2);
}

.btn-social svg {
    flex-shrink: 0;
}

/* Error Messages */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
    min-height: 1.2rem;
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 2rem;
    color: #0A2647;
    opacity: 0.8;
}

.form-footer a {
    color: #2C9CA6;
    text-decoration: none;
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

.forgot-password {
    display: inline-block;
    margin-bottom: 1rem;
}

/* Forgot Password Modal tweaks */
#forgot-password-modal .modal-content h3 {
    color: #4285f4;
}

#forgot-password-modal .form-buttons .btn-secondary {
    background: #f1f3f4;
    color: #3c4043;
}

/* Page Management */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Loading Spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4285f4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 100px;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: #FFFFFF;
    font-weight: 500;
    z-index: 3000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.toast.success {
    background: #2C9CA6;
}

.toast.error {
    background: #dc3545;
}

.toast.show {
    transform: translateX(0);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.modal-content {
    background: #FFFFFF;
    padding: 2rem;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: fadeInUp 0.3s ease;
    border: 1px solid #F4F4F4;
}

/* Success Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    backdrop-filter: blur(4px);
}

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

.success-icon {
    margin-bottom: 1.5rem;
    animation: bounceIn 0.6s ease;
}

.modal-overlay .modal-content h2 {
    color: #2C9CA6;
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.modal-overlay .modal-content p {
    color: #0A2647;
    opacity: 0.8;
    margin-bottom: 2rem;
    line-height: 1.6;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h3 {
    color: #2C9CA6;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

#application-summary {
    text-align: left;
    background: #F4F4F4;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #0A2647;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-logo h2 {
        font-size: 1.5rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .container {
        padding: 5rem 1rem 2rem;
    }
    
    .form-card {
        padding: 2rem;
    }
    
    .form-card h2 {
        font-size: 1.75rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .social-buttons {
        flex-direction: column;
    }
    
    .toast {
        right: 1rem;
        left: 1rem;
        transform: translateY(-100px);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .nav-links a, .nav-link {
        font-size: 0.9rem;
    }
    
    .form-card {
        padding: 1.5rem;
    }
    
    .form-card h2 {
        font-size: 1.5rem;
    }
    
    input, select, textarea {
        padding: 0.75rem;
    }
    
    .btn-primary {
        padding: 0.875rem;
    }
    
    .btn-social {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .form-card {
        border: 2px solid #333;
    }
    
    input, select, textarea {
        border-width: 2px;
    }
}

/* Focus indicators for keyboard navigation */
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
    outline: 3px solid #4285f4;
    outline-offset: 2px;
}

/* OAuth Modal Styles */
.oauth-content {
    background: white;
    border-radius: 8px;
    width: 400px;
    max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.3s ease;
}

.oauth-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e8eaed;
}

.oauth-header svg {
    margin-bottom: 1rem;
}

.oauth-header h3 {
    color: #202124;
    font-size: 1.375rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.oauth-header p {
    color: #5f6368;
    font-size: 0.875rem;
    margin: 0;
}

.google-account {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #e8eaed;
}

.google-account:hover {
    background: #f8f9fa;
}

.google-account:last-child {
    border-bottom: none;
}

.account-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #4285f4;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    margin-right: 1rem;
    font-size: 0.875rem;
}

.account-info {
    flex: 1;
}

.account-name {
    font-weight: 500;
    color: #202124;
    margin-bottom: 0.25rem;
}

.account-email {
    color: #5f6368;
    font-size: 0.875rem;
}

.selected-account {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.selected-account .account-avatar {
    margin-right: 0.75rem;
}

.permissions {
    padding: 1rem 2rem;
}

.permissions p {
    color: #202124;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.permissions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.permissions li {
    color: #5f6368;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.permissions li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #5f6368;
}

.oauth-buttons {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 2rem 2rem;
}

.oauth-footer {
    text-align: center;
    padding: 1rem 2rem 2rem;
}

.btn-text {
    background: none;
    border: none;
    color: #1a73e8;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.btn-text:hover {
    background: #f8f9ff;
}

/* Progress Indicator */
.progress-indicator {
    text-align: center;
    background: #F4F4F4;
    color: #0A2647;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-size: 0.875rem;
}

/* Form Buttons */
.form-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-buttons .btn-secondary {
    flex: 1;
}

.form-buttons .btn-primary {
    flex: 2;
    margin-top: 0;
}

/* Review Section */
.review-section {
    background: #F4F4F4;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.review-section h3 {
    color: #0A2647;
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.review-section p {
    margin-bottom: 0.5rem;
    color: #0A2647;
}

@media (max-width: 768px) {
    .form-buttons {
        flex-direction: column;
    }
}

/* Applications Page Styles */
.no-applications {
    text-align: center;
    padding: 3rem;
    color: #0A2647;
    opacity: 0.7;
}

.applications-summary {
    background: #0A2647;
    color: #FFFFFF;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
}

.applications-grid {
    display: grid;
    gap: 1.5rem;
}

.application-card {
    background: #FFFFFF;
    border: 1px solid #F4F4F4;
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.application-card:hover {
    box-shadow: 0 4px 12px rgba(10, 38, 71, 0.1);
    border-color: #2C9CA6;
}

.application-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #F4F4F4;
}

.application-header h4 {
    color: #0A2647;
    margin: 0;
    font-weight: 600;
}

.application-date {
    color: #0A2647;
    opacity: 0.7;
    font-size: 0.875rem;
}

.application-details p {
    margin-bottom: 0.5rem;
    color: #0A2647;
}

.highlight-section {
    background: #F4F4F4;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border-left: 4px solid #2C9CA6;
}

.education-section, .skills-section, .documents-section, .preferences-section {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #FFFFFF;
    border: 1px solid #F4F4F4;
    border-radius: 4px;
}

.highlight-section p {
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.highlight-section p:first-child {
    color: #0A2647;
    font-size: 1.1rem;
    font-weight: 600;
}

.application-status {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-info {
    display: flex;
    align-items: center;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-pending {
    background: #F4F4F4;
    color: #0A2647;
    border: 1px solid #2C9CA6;
}

.btn-cancel {
    padding: 0.5rem 1rem;
    background: #dc3545;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #0A2647;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .application-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}