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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Login Page Styles */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #ff6b6b, #ffd93d);
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-width: 400px;
}

.login-form h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #333;
}

.login-form p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

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

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
}

.error-message {
    display: none;
    background: #ff6b6b;
    color: white;
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
}

/* Dashboard Styles */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: white;
    font-size: 2em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-actions span {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Hero Section */
.hero {
    padding: 60px 0;
    text-align: center;
    color: white;
}

.hero h2 {
    font-size: 3em;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.3em;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    color: white;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Failures Section */
.failures-section {
    background: #f8f9fa;
    padding: 60px 0;
    min-height: 50vh;
}

.failures-section h3 {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    color: #333;
}

.failures-container {
    display: grid;
    gap: 25px;
}

.failure-post {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #ff6b6b;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.failure-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.failure-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.failure-title {
    font-size: 1.4em;
    font-weight: 600;
    color: #333;
    flex: 1;
    min-width: 200px;
}

.failure-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.failure-date {
    font-size: 0.9em;
    color: #666;
}

.failure-sender {
    font-size: 0.85em;
    color: #888;
    background: #f1f3f4;
    padding: 3px 8px;
    border-radius: 12px;
}

.failure-content {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.5;
    color: #555;
    white-space: pre-wrap;
    border: 1px solid #e9ecef;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: #666;
}

.no-failures {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-failures h4 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2em;
    }
    
    .hero p {
        font-size: 1.1em;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .failure-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .failure-meta {
        align-items: flex-start;
    }
    
    .login-container {
        min-width: auto;
        margin: 20px;
        padding: 30px;
    }
}

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

.failure-post {
    animation: fadeIn 0.5s ease forwards;
}
