/* public/css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    padding: 40px 20px;
}

.container {
    max-width: 700px;
    margin: 0 auto;
}

.card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

h1 {
    color: #fff;
    font-size: 28px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    font-size: 14px;
}

/* フォーム */
.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    color: #fff;
    margin-bottom: 8px;
    font-weight: 500;
}

label .required {
    color: #ff6b6b;
    margin-left: 4px;
}

input, select, textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #ff8a65;
    background: rgba(0, 0, 0, 0.5);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

.hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

/* プランセレクター */
.plan-selector {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.plan-option {
    flex: 1;
    min-width: 150px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.plan-option.selected {
    border-color: #ff8a65;
    background: rgba(255, 138, 101, 0.2);
}

.plan-option:hover {
    border-color: #ff8a65;
    transform: translateY(-2px);
}

.plan-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #fff;
}

.plan-price {
    font-size: 24px;
    font-weight: bold;
    color: #ffd93d;
}

.plan-price small {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.plan-features {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
}

.plan-features li {
    list-style: none;
    padding: 4px 0;
}

/* 利用状況表示 */
.usage-info {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 24px;
}

.usage-title {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 12px;
}

.usage-stats {
    display: flex;
    gap: 24px;
    justify-content: space-around;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #ffd93d;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.current-plan {
    background: rgba(255, 138, 101, 0.2);
    padding: 10px 16px;
    border-radius: 12px;
    color: #ff8a65;
    font-weight: bold;
    display: inline-block;
}

.upgrade-link {
    display: inline-block;
    margin-left: 12px;
    color: #ffd93d;
    text-decoration: none;
    font-size: 14px;
}

.upgrade-link:hover {
    text-decoration: underline;
}

/* ボタン */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #ff8a65, #ff6b6b);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.secondary-btn {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    margin-top: 12px;
    transition: background 0.2s;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* メッセージ */
.error {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid #ff6b6b;
    border-radius: 12px;
    padding: 12px;
    color: #ff6b6b;
    margin-bottom: 20px;
}

.success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4caf50;
    border-radius: 12px;
    padding: 12px;
    color: #4caf50;
    margin-bottom: 20px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.7);
}

/* ログイン画面 */
.login-prompt {
    text-align: center;
    padding: 40px;
}

.login-btn {
    background: #5865F2;
    color: white;
    padding: 12px 32px;
    border-radius: 12px;
    text-decoration: none;
    display: inline-block;
    margin-top: 16px;
    font-weight: bold;
    transition: opacity 0.2s;
}

.login-btn:hover {
    opacity: 0.9;
}

/* モーダル */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #1a1a2e;
    border-radius: 24px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-content h2 {
    color: white;
    margin-bottom: 16px;
}

.upgrade-plans {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.upgrade-plan {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.upgrade-plan:hover {
    background: rgba(255, 138, 101, 0.2);
    border-color: #ff8a65;
}

.upgrade-plan-name {
    font-weight: bold;
    color: white;
}

.upgrade-plan-price {
    color: #ffd93d;
    font-weight: bold;
}

.upgrade-plan-btn {
    background: #ff8a65;
    border: none;
    padding: 6px 16px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
}

.close-modal {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    margin-top: 16px;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* フッター */
.footer {
    text-align: center;
    margin-top: 32px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

.footer p {
    margin: 4px 0;
}

/* レスポンシブ */
@media (max-width: 640px) {
    body {
        padding: 20px 16px;
    }
    
    .card {
        padding: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .plan-selector {
        flex-direction: column;
    }
    
    .plan-option {
        min-width: auto;
    }
    
    .usage-stats {
        gap: 12px;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .upgrade-plan {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-group a {
        text-align: center;
    }
}