/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.25rem;
}

.tagline {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

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

.nav-link {
    text-decoration: none;
    color: #667eea;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #764ba2;
}

/* Main Content */
.main-content {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 3rem 1.5rem 2.5rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    margin-bottom: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hero-content {
    max-width: 720px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.4rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #ffffff;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.75rem;
}

.hero-cta {
    background: #ffffff;
    color: #667eea;
    border: none;
    padding: 0.9rem 1.8rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hero-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
    background: #f3f4ff;
}

/* How It Works */
.how-it-works {
    margin: 3rem 0 2.5rem;
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.section-title {
    text-align: center;
    font-size: 1.6rem;
    color: #333;
    margin-bottom: 2rem;
}

.how-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
}

.how-step {
    text-align: center;
    padding: 1.5rem 1.25rem;
    border-radius: 14px;
    background: #f8f9ff;
    border: 1px solid #e2e6ff;
}

.how-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 0.9rem;
}

.how-step h4 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.how-step p {
    font-size: 0.95rem;
    color: #666;
}

/* Why Refmee */
.why-refmee {
    margin: 0 0 2.5rem;
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
}

.why-card {
    background: #f9fafb;
    border-radius: 14px;
    padding: 1.5rem 1.25rem;
    border: 1px solid #e5e7eb;
}

.why-card h4 {
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
    color: #333;
}

.why-card ul {
    list-style: none;
    padding-left: 0;
}

.why-card li {
    position: relative;
    padding-left: 1.4rem;
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0.5rem;
}

.why-card li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: #667eea;
    font-size: 1.1rem;
}

.auth-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Auth Cards */
.auth-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.auth-card h2 {
    color: #667eea;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.card-subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 2rem;
    font-style: italic;
}

/* Forms */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.auth-form input {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.auth-form input[style*="display: none"] {
    display: none !important;
}

.auth-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.toggle-text {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.toggle-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.toggle-link:hover {
    text-decoration: underline;
}

.forgot-password {
    display: block;
    text-align: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Dashboard Styles */
.dashboard {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.dashboard h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
    text-align: center;
}

.dashboard-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.dashboard-section h3 {
    color: #333;
    margin-bottom: 1rem;
}

.letter-card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
}

.letter-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.copy-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.copy-btn:hover {
    background: #5a6fd8;
}

.user-id {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    font-family: monospace;
    font-size: 1.1rem;
    text-align: center;
    margin: 1rem 0;
}

.student-id {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
    margin: 1rem 0;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.file-input {
    padding: 1rem;
    border: 2px dashed #667eea;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
}

.file-input:hover {
    background: #f8f9fa;
}

.access-form {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.access-form input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav-left {
        align-items: center;
    }
    
    .auth-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .main-content {
        padding: 2rem 1rem;
    }
    
    .access-form {
        flex-direction: column;
    }
    
    .letter-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .hero-title {
        font-size: 1.7rem;
    }
    
    .hero-section {
        padding: 2.25rem 1.25rem 2rem;
    }
    
    .how-it-works,
    .why-refmee {
        padding: 2rem 1.25rem;
    }
    
    .how-steps,
    .why-grid {
        grid-template-columns: 1fr;
    }
}

/* Success/Error Messages */
.message {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    text-align: center;
}

.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Password Fields */
.password-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.password-fields.hidden {
    display: none;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

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

.modal-content p {
    color: #666;
    margin-bottom: 1.5rem;
}

/* OTP Input Styles */
.otp-inputs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.otp-input {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.otp-input:focus {
    outline: none;
    border-color: #667eea;
}

.resend-text {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.resend-text a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.resend-text a:hover {
    text-decoration: underline;
}

/* Table Styles */
.letters-table {
    overflow-x: auto;
    margin-top: 1rem;
}

.letters-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.letters-table th,
.letters-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.letters-table th {
    background: #667eea;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.letters-table tr:hover {
    background: #f8f9fa;
}

.letters-table tr:last-child td {
    border-bottom: none;
}

/* Verified Badge */
.verified-badge {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
    display: inline-block;
}

/* Action Buttons */
.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    margin: 0 2px;
    transition: all 0.3s ease;
}

.download-btn {
    background: #28a745;
    color: white;
}

.download-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.view-btn {
    background: #007bff;
    color: white;
}

.view-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

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

.close-btn:hover {
    background: #545b62;
    transform: translateY(-1px);
}

/* Letter Details Modal */
.letter-details {
    margin: 1.5rem 0;
    text-align: left;
}

.detail-row {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row strong {
    color: #667eea;
    min-width: 100px;
}

.letter-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Responsive Table */
@media (max-width: 768px) {
    .letters-table {
        font-size: 0.8rem;
    }
    
    .letters-table th,
    .letters-table td {
        padding: 8px 12px;
    }
    
    .action-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    .letter-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Hidden class for toggling visibility */
.hidden {
    display: none;
} 