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

body {
    font-family: 'Inter', -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: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Main Content */
.main {
    margin-bottom: 30px;
}

/* Message Section */
.message-section {
    padding: 40px;
    background: #f7fafc;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message-section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2d3748;
}

.description {
    color: #718096;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.message-form {
    max-width: 600px;
    position: relative;
}

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

input[type="text"] {
    width: 100%;
    height: 50px;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.char-count {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 0.875rem;
    color: #a0aec0;
}

.submit-container {
    position: relative;
    display: inline-block;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 150px;
}

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

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.message-status {
    position: absolute;
    top: 50%;
    left: calc(100% + 15px);
    transform: translateY(-50%);
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 10;
    min-width: 150px;
}

.message-status.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.message-status.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}

/* Statistics Section */
.stats-section {
    padding: 40px;
    background: #f7fafc;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stats-section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #2d3748;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #f7fafc;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

.stat-label {
    color: #718096;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.time-periods {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.period-btn {
    background: white;
    border: 2px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.period-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.period-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Messages Section */
.messages-section {
    padding: 40px;
    background: #f7fafc;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.messages-section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #2d3748;
}

.messages-container {
    display: grid;
    gap: 20px;
}

.message-card {
    background: #f7fafc;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: transform 0.2s ease;
}

.message-card:hover {
    transform: translateX(5px);
}

.message-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #2d3748;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #718096;
}

.message-time {
    font-weight: 500;
}

/* New message animation */
.new-message {
    animation: slideInFromTop 0.5s ease-out;
    background: linear-gradient(135deg, #f0fff4 0%, #e6fffa 100%);
    border-left: 4px solid #48bb78;
}

@keyframes slideInFromTop {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading {
    text-align: center;
    padding: 40px;
    color: #718096;
    font-style: italic;
}

/* Footer */
.footer {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 40px;
}

.disclaimer h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2d3748;
}

.disclaimer h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 20px 0 10px 0;
    color: #2d3748;
}

.disclaimer p {
    margin-bottom: 15px;
    color: #4a5568;
    line-height: 1.6;
}

.disclaimer ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.disclaimer li {
    margin-bottom: 8px;
    color: #4a5568;
}

.experiment-note {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    padding: 15px;
    border-radius: 8px;
    color: #742a2a;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .message-section,
    .stats-section,
    .messages-section,
    .footer {
        padding: 25px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .time-periods {
        flex-direction: column;
        align-items: center;
    }
    
    .period-btn {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .message-section h2,
    .stats-section h2,
    .messages-section h2 {
        font-size: 1.5rem;
    }
} 