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

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

.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* ホーム画面 */
.home-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.home-header {
    text-align: center;
    margin-bottom: 4rem;
    color: white;
}

.home-header i {
    font-size: 5rem;
    margin-bottom: 1rem;
}

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

.home-header p {
    font-size: 1.3rem;
    opacity: 0.9;
}

.home-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 500px;
}

.home-btn {
    padding: 3rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.home-btn i {
    font-size: 5rem;
}

.home-btn:active {
    transform: scale(0.95);
}

.btn-clock-in {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.btn-clock-out {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
}

.btn-report {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* 利用者選択画面 */
.select-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.select-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-back {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-back:active {
    background: rgba(255, 255, 255, 0.3);
}

.select-header h2 {
    font-size: 1.8rem;
    flex: 1;
}

.user-list {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: grid;
    gap: 1rem;
}

.user-item {
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.user-item i {
    font-size: 2.5rem;
}

.user-item:active {
    transform: scale(0.98);
}

/* パスワード入力画面 */
.password-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.password-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.password-header h2 {
    font-size: 1.8rem;
}

.password-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.password-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    gap: 2rem;
}

.password-input {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    font-size: 2.5rem;
    text-align: center;
    border: 3px solid #667eea;
    border-radius: 15px;
    letter-spacing: 1rem;
}

.btn-verify {
    width: 100%;
    max-width: 400px;
    padding: 1.8rem;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-verify:active {
    transform: scale(0.98);
}

.error-message {
    margin: 0 2rem;
    padding: 1.5rem;
    color: #c0392b;
    text-align: center;
    font-weight: 700;
    font-size: 1.3rem;
    background: #ffebee;
    border-radius: 10px;
    display: none;
}

.error-message.show {
    display: block;
}

/* 日報作成画面 */
.report-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.report-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.report-header h2 {
    font-size: 1.8rem;
}

.report-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.report-body {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.date-selector-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
}

.date-selector-section h3,
.task-selection-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
}

.date-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.btn-date-nav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.btn-date-nav:active {
    transform: scale(0.95);
}

#reportDateInput {
    flex: 1;
    padding: 1.2rem;
    font-size: 1.3rem;
    border: 2px solid #667eea;
    border-radius: 10px;
    text-align: center;
}

.date-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

#currentReportDateDisplay {
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
}

.report-indicator {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
}

.report-indicator.exists {
    background: #d4edda;
    color: #155724;
}

.report-indicator.exists::before {
    content: '✓ 登録済み';
}

.report-indicator.new {
    background: #fff3cd;
    color: #856404;
}

.report-indicator.new::before {
    content: '未登録';
}

.task-selection-section {
    margin-top: 1.5rem;
}

.task-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.task-btn {
    padding: 2rem 1rem;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    background: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s;
    font-size: 1.1rem;
    font-weight: 700;
    color: #666;
}

.task-btn i {
    font-size: 2.5rem;
}

.task-btn:active {
    transform: scale(0.95);
}

.task-btn.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.report-footer {
    padding: 1.5rem;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-submit-single {
    width: 100%;
    padding: 1.5rem;
    border: 2px solid #667eea;
    background: white;
    border-radius: 15px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: all 0.2s;
}

.btn-submit-single:active {
    transform: scale(0.98);
    background: #f8f9ff;
}

.btn-submit-single i {
    font-size: 1.8rem;
}

.btn-submit-report {
    width: 100%;
    padding: 1.8rem;
    border: none;
    border-radius: 15px;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: transform 0.2s;
}

.btn-submit-report:active {
    transform: scale(0.98);
}

.btn-submit-report i {
    font-size: 2rem;
}

/* 成功モーダル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
}

.success-content {
    padding: 3rem;
    text-align: center;
}

.success-icon {
    font-size: 6rem;
    color: #38ef7d;
    margin-bottom: 1.5rem;
}

.success-content h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1rem;
}

.success-content p {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 0;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .home-header h1 {
        font-size: 2rem;
    }
    
    .home-btn {
        padding: 2.5rem 1.5rem;
        font-size: 1.8rem;
    }
    
    .home-btn i {
        font-size: 4rem;
    }
    
    .task-grid {
        grid-template-columns: 1fr;
    }
}

/* iPad横向き対応 */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .home-buttons {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1000px;
    }
    
    .task-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 768px) {
    .user-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .user-list {
        grid-template-columns: repeat(3, 1fr);
    }
}
