/* Mental Leap Calculator - Public Styles */

.mlc-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.mlc-form-title {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
}

.mlc-form-group {
    margin-bottom: 25px;
}

.mlc-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
    font-size: 16px;
}

.mlc-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.mlc-form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.mlc-question {
    margin-bottom: 20px;
}

.mlc-question-text {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 18px;
}

.mlc-radio-group {
    display: grid;
    gap: 12px;
}

.mlc-radio-item {
    position: relative;
}

.mlc-radio-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.mlc-radio-label {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
}

.mlc-radio-label:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.mlc-radio-input:checked + .mlc-radio-label {
    border-color: #3498db;
    background: #e3f2fd;
    color: #1976d2;
}

.mlc-radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #bdc3c7;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.mlc-radio-input:checked + .mlc-radio-label .mlc-radio-custom {
    border-color: #3498db;
}

.mlc-radio-input:checked + .mlc-radio-label .mlc-radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #3498db;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.mlc-age-preview {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    display: none;
}

.mlc-preview-content {
    font-size: 14px;
    line-height: 1.6;
    color: #5a6c7d;
}

.mlc-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.mlc-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.mlc-submit:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.mlc-result {
    margin-top: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.mlc-result.mlc-result-show {
    opacity: 1;
    transform: translateY(0);
}

.mlc-result-content {
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 12px;
    border: 1px solid #e1e8ed;
}

.mlc-main-message {
    font-size: 18px;
    line-height: 1.6;
    color: #2c3e50;
    margin-bottom: 25px;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.mlc-age-details {
    margin-bottom: 25px;
}

.mlc-age-details h4 {
    margin-bottom: 15px;
    color: #34495e;
    font-size: 16px;
}

.mlc-age-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.mlc-age-item {
    padding: 15px;
    background: #ffffff;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e1e8ed;
}

.mlc-age-label {
    display: block;
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.mlc-age-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.mlc-leap-info {
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e1e8ed;
}

.mlc-leap-active {
    border-left: 4px solid #e74c3c;
    background: linear-gradient(135deg, #ffeaea, #ffffff);
}

.mlc-leap-upcoming {
    border-left: 4px solid #f39c12;
    background: linear-gradient(135deg, #fff8e1, #ffffff);
}

.mlc-leap-info h4 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 16px;
}

.mlc-progress-bar {
    width: 100%;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0 5px 0;
}

.mlc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e74c3c, #c0392b);
    transition: width 0.5s ease;
}

.mlc-content-link {
    text-align: center;
    margin-top: 20px;
}

.mlc-content-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mlc-content-btn:hover {
    background: linear-gradient(135deg, #229954, #1e7e34);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
    color: white;
    text-decoration: none;
}

.mlc-loading {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-style: italic;
}

.mlc-error {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #fdedec;
    border: 1px solid #f1c0c0;
    border-radius: 8px;
    color: #c0392b;
}

.mlc-error-icon {
    margin-right: 10px;
    font-size: 18px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .mlc-form {
        padding: 20px;
        margin: 10px;
    }
    
    .mlc-form-title {
        font-size: 24px;
    }
    
    .mlc-age-grid {
        grid-template-columns: 1fr;
    }
    
    .mlc-radio-group {
        gap: 8px;
    }
    
    .mlc-radio-label {
        padding: 10px 12px;
    }
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mlc-result-content > * {
    animation: fadeInUp 0.6s ease forwards;
}

.mlc-result-content > *:nth-child(2) {
    animation-delay: 0.1s;
}

.mlc-result-content > *:nth-child(3) {
    animation-delay: 0.2s;
}

.mlc-result-content > *:nth-child(4) {
    animation-delay: 0.3s;
}