/* ========================================
   INTERNN-SHIP COMPLETE STYLES
   Includes: Login, Signup, Main App, Profile, Swipe Cards
   ======================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================
   AUTHENTICATION SECTION (Login/Signup)
   ======================================== */

.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    position: relative;
    animation: fadeIn 0.5s ease;
}

.auth-container {
    background: white;
    border-radius: 30px;
    padding: 50px 40px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-header .logo-icon {
    font-size: 60px;
    display: block;
    margin-bottom: 10px;
}

.auth-header h1 {
    font-size: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.auth-header p {
    color: #666;
    font-size: 14px;
}

/* Auth Forms */
.auth-form {
    display: none;
    animation: fadeIn 0.3s ease;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
}

.auth-form input,
.auth-form select {
    width: 100%;
    padding: 14px 16px;
    margin: 10px 0;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.auth-form input:focus,
.auth-form select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-form input:hover,
.auth-form select:hover {
    border-color: #667eea;
}

.auth-form button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.auth-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.auth-form button:active {
    transform: translateY(0);
}

.auth-form p {
    text-align: center;
    margin-top: 25px;
    color: #666;
}

.auth-form a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s;
}

.auth-form a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ========================================
   MAIN APP SECTION (After Login)
   ======================================== */

#main-app {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span:first-child {
    font-size: 24px;
    -webkit-text-fill-color: initial;
}

.nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    padding: 8px 18px;
    border: none;
    background: #f0f0f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
}

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

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

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

/* Sections */
.section {
    display: none;
    background: white;
    border-radius: 25px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
}

/* ========================================
   SWIPE CARD STYLES (Tinder-like)
   ======================================== */

#card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

#card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

#card h2 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 24px;
}

.company {
    color: #666;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 500;
}

.badge {
    display: inline-block;
    background: #f0f0f0;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin: 5px 5px 5px 0;
    color: #555;
}

.skill-tag {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    margin: 5px 5px 5px 0;
    font-weight: 500;
}

.description {
    margin: 15px 0;
    line-height: 1.6;
    color: #555;
}

.match-score {
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    text-align: center;
}

.match-score div:first-child {
    color: #666;
    margin-bottom: 5px;
}

.score {
    font-size: 28px;
    font-weight: bold;
    color: #28a745;
}

/* Action Buttons */
.buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 20px 0;
}

.skip, .like {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    border: none;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.skip:hover, .like:hover {
    transform: scale(1.1);
}

.skip:hover {
    background: #dc3545;
    color: white;
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.3);
}

.like:hover {
    background: #28a745;
    color: white;
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

.skip:active, .like:active {
    transform: scale(0.95);
}

.tip {
    text-align: center;
    font-size: 12px;
    color: #888;
    margin-top: 15px;
}

/* ========================================
   PROFILE SECTION STYLES
   ======================================== */

.profile-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.profile-info p {
    margin: 12px 0;
    padding: 10px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
}

.profile-info strong {
    color: #667eea;
    min-width: 100px;
    font-weight: 600;
}

.profile-info span {
    color: #333;
}

.edit-btn {
    margin-top: 20px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

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

/* Edit Profile Form */
.profile-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 20px;
    margin-top: 20px;
    animation: fadeIn 0.3s ease;
}

.profile-form h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.profile-form input,
.profile-form select {
    width: 100%;
    padding: 12px 15px;
    margin: 10px 0;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.profile-form input:focus,
.profile-form select:focus {
    outline: none;
    border-color: #667eea;
}

.profile-form button {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 10px;
}

#update-profile-btn {
    background: #28a745;
    color: white;
    margin-right: 10px;
}

#update-profile-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.cancel-btn {
    background: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* ========================================
   SAVED INTERNSHIPS STYLES
   ======================================== */

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

.saved-item {
    background: #f8f9fa;
    padding: 18px;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.saved-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.saved-item h3 {
    color: #667eea;
    margin-bottom: 8px;
    font-size: 18px;
}

.saved-item p {
    color: #666;
    margin: 5px 0;
    font-size: 14px;
}

.saved-item button {
    margin-top: 12px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.saved-item button:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

/* ========================================
   MODAL (Cover Letter Popup)
   ======================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 550px;
    margin: 60px auto;
    padding: 30px;
    border-radius: 25px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.close {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.modal-content h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 24px;
}

#cover-letter {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    white-space: pre-wrap;
    line-height: 1.7;
    font-size: 14px;
    color: #333;
    border: 1px solid #e0e0e0;
}

#copy-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* ========================================
   LOADER & NOTIFICATION STYLES
   ======================================== */

.loader {
    text-align: center;
    padding: 50px;
    color: #666;
    font-size: 16px;
}

.loader::before {
    content: "🔄";
    display: inline-block;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
}

/* Notification Toast */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    z-index: 1100;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   RESPONSIVE DESIGN (Mobile Friendly)
   ======================================== */

@media (max-width: 768px) {
    .auth-container {
        padding: 35px 25px;
        margin: 20px;
    }
    
    .auth-header h1 {
        font-size: 28px;
    }
    
    #main-app {
        padding: 15px;
    }
    
    header {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 15px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .nav {
        order: 2;
        width: 100%;
        justify-content: center;
    }
    
    .logout-btn {
        order: 1;
    }
    
    .nav-btn {
        padding: 6px 14px;
        font-size: 13px;
    }
    
    .section {
        padding: 18px;
    }
    
    #card {
        padding: 18px;
    }
    
    #card h2 {
        font-size: 20px;
    }
    
    .skip, .like {
        width: 65px;
        height: 65px;
        font-size: 28px;
    }
    
    .modal-content {
        width: 95%;
        margin: 40px auto;
        padding: 20px;
    }
    
    .profile-info p {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .profile-info strong {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 25px 20px;
    }
    
    .auth-form input,
    .auth-form select {
        padding: 12px 14px;
        font-size: 13px;
    }
    
    .skip, .like {
        width: 55px;
        height: 55px;
        font-size: 24px;
    }
    
    .buttons {
        gap: 15px;
    }
    
    .skill-tag {
        font-size: 11px;
        padding: 4px 10px;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}
/* ========================================
   APPLICATION & UPLOAD STYLES
   ======================================== */

#apply-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px dashed #667eea;
    border-radius: 12px;
    background: #f8f9fa;
    cursor: pointer;
}

.form-group input[type="file"]:hover {
    background: #e8eaf6;
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-family: inherit;
    resize: vertical;
}

.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

#submit-apply-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#submit-apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

#submit-apply-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Success Modal */
.success-content {
    text-align: center;
}

.success-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.success-content h2 {
    color: #28a745;
    margin-bottom: 15px;
}

#success-message {
    color: #333;
    margin-bottom: 20px;
    line-height: 1.6;
}

.success-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

.success-btn:hover {
    transform: scale(1.05);
}

/* Loading spinner for apply button */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
.view-btn, .apply-now-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-btn {
    background: #6c757d;
    color: white;
}

.view-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.apply-now-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.apply-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
}