* {
    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: 20px;
}

header {
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

header h1 {
    color: white;
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin: 0;
}

.auth-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.connection-status {
    font-size: 14px;
    font-weight: 600;
}

.connection-status .connected {
    color: #68d391;
}

.connection-status .offline {
    color: #fc8181;
}

.auth-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.auth-button, .sync-button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: auto;
}

.auth-button.signed-out {
    background: #4299e1;
    color: white;
}

.auth-button.signed-in {
    background: #e53e3e;
    color: white;
}

.sync-button {
    background: #38a169;
    color: white;
}

.auth-button:hover, .sync-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.sync-button:disabled, .auth-button:disabled, .auth-button.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-button.disabled {
    background: #a0a0a0 !important;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.schedule-form, .schedule-list {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.schedule-form h2, .schedule-list h2 {
    margin-bottom: 20px;
    color: #4a5568;
    font-size: 1.5rem;
}

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2d3748;
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

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

button:active {
    transform: translateY(0);
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-controls select {
    width: auto;
    min-width: 150px;
}

.filter-controls button {
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
    background: #e53e3e;
}

.filter-controls button:hover {
    background: #c53030;
    box-shadow: 0 3px 10px rgba(197, 48, 48, 0.4);
}

.schedule-items {
    max-height: 500px;
    overflow-y: auto;
}

.schedule-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.schedule-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.schedule-item.priority-high {
    border-left-color: #e53e3e;
}

.schedule-item.priority-medium {
    border-left-color: #ed8936;
}

.schedule-item.priority-low {
    border-left-color: #38a169;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.schedule-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sync-status {
    font-size: 14px;
    opacity: 0.8;
}

.schedule-datetime {
    font-size: 14px;
    color: #718096;
    margin-bottom: 8px;
}

.schedule-description {
    color: #4a5568;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.priority-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-high {
    background: #fed7d7;
    color: #c53030;
}

.priority-medium {
    background: #feebc8;
    color: #c05621;
}

.priority-low {
    background: #c6f6d5;
    color: #2f855a;
}

.schedule-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    width: auto;
}

.btn-edit {
    background: #4299e1;
}

.btn-edit:hover {
    background: #3182ce;
    box-shadow: 0 3px 10px rgba(49, 130, 206, 0.4);
}

.btn-delete {
    background: #e53e3e;
}

.btn-delete:hover {
    background: #c53030;
    box-shadow: 0 3px 10px rgba(197, 48, 48, 0.4);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.empty-state p {
    font-size: 16px;
}

@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .container {
        padding: 10px;
    }
    
    .schedule-form, .schedule-list {
        padding: 20px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    
    .auth-section {
        align-items: center;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .list-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-controls {
        justify-content: space-between;
    }
    
    .filter-controls select {
        min-width: auto;
        flex: 1;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .schedule-form, .schedule-list {
        padding: 15px;
    }
    
    .schedule-header {
        flex-direction: column;
        gap: 5px;
    }
    
    .filter-controls {
        flex-direction: column;
        gap: 10px;
    }
}