/* 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-color: #f8f9fa;
}

/* Header */
header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    text-align: center;
    padding: 2rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

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

section {
    margin-bottom: 3rem;
}

h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 1rem;
    border-bottom: 3px solid #3498db;
    padding-bottom: 0.5rem;
}

/* Case overview */
.case-overview {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.case-overview p {
    font-size: 1.1rem;
    color: #555;
}

/* Document grid */
.document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.document-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid #3498db;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.document-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.document-card p {
    color: #666;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.7rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
    font-weight: 500;
}

.btn:hover {
    background: #2980b9;
    text-decoration: none;
}

/* Case files section */
.case-files {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Beautiful documents section */
.beautiful-documents {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    border-left: 5px solid #f39c12;
}

.beautiful-documents h2 {
    color: #2c3e50;
    border-bottom: 3px solid #f39c12;
}

.beautiful-documents .document-card {
    border-left: 4px solid #f39c12;
    background: white;
}

.beautiful-documents .document-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(243, 156, 18, 0.2);
}

.beautiful-documents .btn {
    background: #f39c12;
    border: 2px solid #f39c12;
}

.beautiful-documents .btn:hover {
    background: #e67e22;
    border-color: #e67e22;
}

/* Key PDFs section */
.key-pdfs {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

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

.pdf-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 5px solid #3498db;
    position: relative;
}

.pdf-card.featured {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-left: 5px solid #f39c12;
    transform: scale(1.02);
}

.pdf-card.featured h3 {
    color: white;
}

.pdf-card.featured p {
    color: rgba(255,255,255,0.9);
}

.pdf-card.coming-soon {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    opacity: 0.7;
    border-left: 5px solid #95a5a6;
}

.pdf-card:hover:not(.coming-soon) {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.pdf-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pdf-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.pdf-btn {
    background: #e74c3c;
    color: white;
    padding: 0.8rem 1.8rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
}

.pdf-btn:before {
    content: "📥";
    font-size: 1.1rem;
}

.pdf-btn:hover:not(.disabled) {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.pdf-btn.disabled {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.6;
}

.pdf-btn.disabled:before {
    content: "⏳";
}

.file-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.file-link {
    background: #e8f4fd;
    color: #2c3e50;
    padding: 1rem 1.5rem;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid #3498db;
    transition: all 0.3s ease;
    font-weight: 500;
}

.file-link:hover {
    background: #3498db;
    color: white;
    text-decoration: none;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

/* Responsive design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .document-grid {
        grid-template-columns: 1fr;
    }
    
    .file-links {
        flex-direction: column;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Login System Styles */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.login-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 3rem;
    max-width: 450px;
    width: 90%;
    animation: slideUp 0.6s ease;
}

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

.login-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #ecf0f1;
}

.login-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.login-header p {
    color: #7f8c8d;
    font-size: 1.1rem;
    font-weight: 500;
}

.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.login-error {
    background: #e74c3c;
    color: white;
    padding: 0.8rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
    display: none;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff40;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

.login-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 2px solid #ecf0f1;
}

.login-footer p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.login-footer p:first-child {
    font-weight: 600;
    color: #2c3e50;
}

/* Logout button */
.logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 1rem;
    font-weight: 500;
}

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

/* Main content wrapper */
.main-content {
    animation: fadeInContent 0.5s ease;
}

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

/* Security notice */
.security-notice {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(243, 156, 18, 0.3);
}

/* Mobile responsiveness for login */
@media (max-width: 768px) {
    .login-container {
        padding: 2rem;
        margin: 1rem;
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
    
    .logout-btn {
        display: block;
        margin: 1rem auto 0;
        width: fit-content;
    }
}