/* AIスクワット記録アプリ - 賢い活動時間ベース通知システム */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

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

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.header h1 i {
    margin-right: 10px;
}

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

.main-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.progress-section {
    text-align: center;
    margin-bottom: 40px;
}

.progress-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.ai-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.progress-circle {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 600;
    color: #667eea;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-message {
    font-size: 1.1rem;
    color: #666;
}

.ai-prediction {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border-radius: 15px;
    color: white;
}

.next-notification {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.next-notification i {
    font-size: 1.2rem;
}

.remaining-notifications {
    font-size: 0.9rem;
    opacity: 0.9;
}

.schedule-section {
    margin-bottom: 30px;
}

.schedule-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.schedule-container {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
}

.schedule-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
    color: white;
    font-weight: 500;
}

.schedule-list {
    max-height: 300px;
    overflow-y: auto;
}

.schedule-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    padding: 12px;
    margin-bottom: 8px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.schedule-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.schedule-time {
    font-weight: 600;
    color: #667eea;
}

.schedule-status {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
    text-align: center;
    font-weight: 500;
}

.schedule-status.scheduled {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
}

.schedule-status.completed {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
}

.schedule-status.missed {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
    color: white;
}

.schedule-info {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    border-radius: 10px;
    color: white;
    text-align: center;
}

.schedule-info i {
    margin-right: 8px;
}

.record-section {
    margin-bottom: 30px;
    text-align: center;
}

.record-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.record-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.record-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.complete-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.complete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.complete-btn:disabled {
    background: linear-gradient(135deg, #81C784, #66BB6A);
    cursor: not-allowed;
}

.reset-btn {
    background: linear-gradient(135deg, #f44336, #da190b);
    color: white;
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 67, 51, 0.3);
}

.notification-section {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
}

.notification-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.smart-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.smart-setting {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.smart-setting label {
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.smart-setting input,
.smart-setting select {
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

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

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1rem;
    padding: 10px;
    background: white;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.toggle-label:hover {
    background: #f8f9fa;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 25px;
    background: #ccc;
    border-radius: 25px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2.5px;
    left: 2.5px;
    transition: 0.3s;
}

input[type="checkbox"]:checked + .toggle-slider {
    background: #667eea;
}

input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(25px);
}

.save-settings-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
}

.save-settings-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.analytics-section {
    margin-bottom: 30px;
}

.analytics-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.analytics-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.analytics-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.card-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.card-content h4 {
    color: #495057;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.card-content p {
    color: #667eea;
    font-weight: 600;
    font-size: 1.2rem;
}

.history-section {
    margin-bottom: 20px;
}

.history-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.history-item {
    padding: 10px 15px;
    margin-bottom: 8px;
    background: white;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.history-item:last-child {
    margin-bottom: 0;
}

.history-time {
    font-size: 0.9rem;
    color: #666;
}

.history-count {
    font-weight: 600;
    color: #667eea;
}

.no-history {
    text-align: center;
    color: #999;
    font-style: italic;
}

.footer {
    text-align: center;
    color: white;
    opacity: 0.8;
}

/* スマート通知用の追加スタイル */
.smart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    max-width: 300px;
}

.smart-notification.show {
    transform: translateX(0);
}

.smart-notification.intensive {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* レスポンシブデザイン（活動時間ベース） */
@media (max-width: 768px) {
    .smart-controls {
        grid-template-columns: 1fr;
    }
    
    .schedule-header {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .schedule-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .analytics-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .smart-setting input,
    .smart-setting select {
        font-size: 14px;
    }
}