/* --- Mobile / Tablet Responsiveness --- */
@media (max-width: 768px) {
    /* Layout & Structure */
    .container {
        padding: 2rem 1rem;
    }
    
    .header-top {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        text-align: center;
    }

    header h1 {
        font-size: 2rem;
    }

    /* Inputs & Buttons - min height 44px for easier tapping */
    .glow-btn, .auth-input, textarea, .auth-tab, .google-btn, .user-info-trigger {
        min-height: 48px;
    }

    /* Make buttons full width on small screens */
    .modal-actions {
        flex-direction: column;
    }

    /* File Upload UI */
    .file-upload-box {
        padding: 2.5rem 1rem;
    }
    
    .file-upload-box p::after {
        content: " (Tap to upload)";
        display: block;
        margin-top: 0.8rem;
        font-weight: 600;
        color: var(--accent);
    }
    
    /* Avoid hover-only interactions visually */
    .file-upload-box.drag-over {
        border-color: var(--accent);
        background: rgba(94, 106, 210, 0.05);
    }

    /* Table -> Card Layout */
    table, thead, tbody, th, td, tr {
        display: block;
    }
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    tr.candidate-row {
        border: 1px solid var(--card-border);
        border-radius: 12px;
        margin-bottom: 1rem;
        background: rgba(255, 255, 255, 0.02);
        padding: 1rem;
        position: relative;
    }
    tr.candidate-row td {
        border: none;
        padding: 0.5rem 0;
        position: relative;
    }
    tr.candidate-row td:first-child {
        padding-top: 0;
        margin-bottom: 0.5rem;
    }
    tr.candidate-row td:nth-child(2) {
        padding-right: 2rem; /* space for chevron */
    }
    .expand-hint-cell {
        position: absolute !important;
        top: 1rem;
        right: 1rem;
        width: auto !important;
        padding: 0 !important;
    }
    
    /* detail row */
    tr.detail-row {
        border: none;
        background: transparent;
        padding: 0;
        margin-top: -1rem; 
        margin-bottom: 1rem;
    }
    .detail-cell {
        border: none !important;
    }
    .detail-panel {
        grid-template-columns: 1fr;
        padding: 1.25rem 1rem;
        border-radius: 0 0 12px 12px;
        border-top: none;
    }
    
    .candidate-stats {
        flex-wrap: wrap;
    }
    
    /* Spacing & Padding adjustments */
    .glass-card {
        padding: 1.25rem;
    }

    /* Disable Zoom Issues via Font Size > 16px */
    .auth-input, textarea {
        font-size: 16px; 
    }
}

/* --- Footer & Contact Modal --- */
.app-footer {
    margin-top: 60px;
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.footer-link, .footer-link-btn {
    color: var(--text-secondary);
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    transition: all 0.2s;
    opacity: 0.8;
}

.footer-link:hover, .footer-link-btn:hover {
    color: var(--primary);
    opacity: 1;
}

/* Contact Modal Styles */
.contact-card {
    width: min(600px, 95vw);
    padding: 40px;
    background: #ffffff !important; /* Premium white background as per image */
    backdrop-filter: blur(20px);
    border-radius: 24px;
    color: #1a1a1a;
}

.contact-card h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    color: #111827;
    letter-spacing: -0.02em;
}

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

.close-modal-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #111827;
    padding: 5px;
    line-height: 1;
    margin-top: -5px;
    margin-right: -10px;
    transition: transform 0.2s;
}

.close-modal-btn:hover {
    transform: scale(1.1);
}

.modal-subtitle {
    color: #6b7280;
    margin-bottom: 32px;
    font-size: 1.1rem;
    font-weight: 400;
}

.contact-card .form-group {
    margin-bottom: 24px;
}

.contact-card .auth-input {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #111827;
    padding: 16px;
    font-size: 1.1rem;
    border-radius: 12px;
}

.contact-card .auth-input::placeholder {
    color: #9ca3af;
}

.contact-card .auth-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

.contact-textarea {
    min-height: 180px;
    resize: vertical;
}

.attach-files-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2563eb;
    cursor: pointer;
    font-weight: 500;
    margin-bottom: 24px;
    width: fit-content;
    font-size: 1.05rem;
}

.attach-files-label:hover {
    text-decoration: underline;
}

.attach-icon {
    font-size: 1.4rem;
    transform: rotate(45deg) translateY(-2px);
    display: inline-block;
}

.send-message-btn {
    width: 100%;
    padding: 20px;
    font-size: 1.2rem;
    font-weight: 700;
    background: #3b82f6 !important; /* Vivid blue from image */
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: filter 0.2s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.send-message-btn:hover {
    filter: brightness(1.1);
}

.contact-file-list {
    list-style: none;
    padding: 0;
    margin-bottom: 15px;
}

.contact-file-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 0.95rem;
    color: #4b5563;
    background: #f3f4f6;
    border-radius: 8px;
    margin-bottom: 8px;
}

@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .contact-card {
        padding: 24px;
    }
    
    .contact-card h2 {
        font-size: 1.8rem;
    }
}
