/* リセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* ヘッダー */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 2px solid #f0f0f0;
}

header h1 {
    font-size: 1.8rem;
    color: #2c5530;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 1rem;
}

/* セクション */
section {
    margin-bottom: 30px;
}

section h2 {
    font-size: 1.3rem;
    color: #2c5530;
    margin-bottom: 15px;
    border-left: 4px solid #4CAF50;
    padding-left: 10px;
}

/* QRバッジ */
.qr-badges {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.badge {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.badge.completed {
    background: #d4edda;
    border-color: #4CAF50;
    transform: scale(1.02);
}

.badge .time {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.badge .status {
    display: block;
    font-weight: bold;
    color: #333;
}

.badge.completed .status {
    color: #2c5530;
}

/* 倍率表示 */
.multiplier {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c5530;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

#current-multiplier {
    color: #ff6b35;
    font-size: 1.5rem;
}

/* ボタン */
.scan-button, .entry-button, .submit-button {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.scan-button {
    background: #4CAF50;
    color: white;
}

.scan-button:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.entry-button {
    background: #ff6b35;
    color: white;
}

.entry-button:hover:not(:disabled) {
    background: #e55a2b;
    transform: translateY(-2px);
}

.entry-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.submit-button {
    background: #007bff;
    color: white;
}

.submit-button:hover {
    background: #0056b3;
}

/* QRリーダー */
#qr-reader {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
}

/* スキャン結果 */
.scan-result {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

.scan-result.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.scan-result.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.scan-result.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 応募セクション */
.entry-note {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

/* フォーム */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.required {
    color: #dc3545;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* 結果メッセージ */
.success-message {
    text-align: center;
    color: #155724;
}

.success-message p {
    margin-bottom: 15px;
}

.entry-number {
    background: #d4edda;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #4CAF50;
    font-size: 1.1rem;
}

.error-message {
    text-align: center;
    color: #721c24;
}

.error-message p {
    margin-bottom: 10px;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .qr-badges {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .badge {
        padding: 12px;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .scan-button, .entry-button, .submit-button {
        padding: 12px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 15px 0;
    }
    
    header h1 {
        font-size: 1.3rem;
    }
    
    section h2 {
        font-size: 1.1rem;
    }
    
    .multiplier {
        font-size: 1rem;
        padding: 12px;
    }
    
    #current-multiplier {
        font-size: 1.3rem;
    }
    
    .modal-content {
        margin: 5% auto;
        padding: 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
    }
}

/* アニメーション */
.badge {
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

.badge.completed {
    animation: pulse 0.6s ease;
}

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