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

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

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    padding: 2rem 1.5rem;
    text-align: center;
    color: white;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

/* Main content */
main {
    padding: 2rem 1.5rem;
}

/* Notification settings */
.notification-settings {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 2px solid #e3e8ff;
}

.setting-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.setting-row label {
    font-weight: 600;
    color: #4c51bf;
    white-space: nowrap;
}

.setting-row select {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 2px solid #e3e8ff;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.setting-row select:focus {
    outline: none;
    border-color: #4facfe;
}

/* Schedule sections */
.schedule-sections {
    margin-bottom: 2rem;
}

.schedule-section {
    margin-bottom: 2rem;
}

.schedule-section h2 {
    font-size: 1.3rem;
    color: #4c51bf;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e3e8ff;
}

.schedule-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.schedule-item {
    background: white;
    border: 2px solid #e3e8ff;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.schedule-item:hover {
    border-color: #4facfe;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.15);
}

.schedule-item.selected {
    border-color: #4facfe;
    background: linear-gradient(135deg, #4facfe10, #00f2fe10);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.2);
}

.schedule-item.selected::before {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    color: #4facfe;
    font-weight: bold;
    font-size: 1.2rem;
}

.schedule-time {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: #4facfe;
    color: white;
    border-radius: 20px;
    display: inline-block;
}

.schedule-events {
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.4;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
    transform: translateY(-2px);
}

/* Status message */
.status-message {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
    margin-top: 1rem;
}

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

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

.status-message.info {
    background: #ebf8ff;
    color: #2a4365;
    border: 2px solid #90cdf4;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 0.5rem;
    }
    
    .container {
        border-radius: 0;
        min-height: 100vh;
    }
    
    header {
        padding: 1.5rem 1rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    main {
        padding: 1.5rem 1rem;
    }
    
    .schedule-grid {
        grid-template-columns: 1fr;
    }
    
    .setting-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .setting-row select {
        min-width: auto;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .schedule-item {
        padding: 0.75rem;
    }
    
    .schedule-time {
        font-size: 1rem;
    }
    
    .schedule-events {
        font-size: 0.85rem;
    }
}

/* PWA Info section */
.pwa-info-section {
    background: #fef5e7;
    border: 2px solid #f6ad55;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.pwa-info-section h3 {
    font-size: 1.2rem;
    color: #c05621;
    margin-bottom: 1rem;
}

.pwa-info-section p {
    color: #744210;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.pwa-info-section ol {
    color: #744210;
    margin: 1rem 0 1rem 1.5rem;
    line-height: 1.6;
}

.pwa-info-section li {
    margin-bottom: 0.5rem;
}

.pwa-note {
    font-size: 0.9rem;
    font-style: italic;
    color: #9c4221 !important;
    margin-top: 1rem !important;
}

@media (max-width: 768px) {
    .pwa-info-section {
        margin: 1.5rem 0;
        padding: 1rem;
    }
    
    .pwa-info-section ol {
        margin-left: 1rem;
    }
}

/* Reference section */
.reference-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e3e8ff;
    text-align: center;
}

.reference-section h3 {
    font-size: 1.2rem;
    color: #4c51bf;
    margin-bottom: 1rem;
}

.reference-section p {
    color: #4a5568;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.reference-section a {
    color: #4facfe;
    text-decoration: none;
    font-weight: 600;
}

.reference-section a:hover {
    text-decoration: underline;
}

.tweet-embed-container {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.tweet-embed-container .twitter-tweet {
    margin: 0 auto !important;
}

@media (max-width: 768px) {
    .reference-section {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }
    
    .tweet-embed-container {
        margin: 1rem 0;
    }
}