/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ ProN W3', 'メイリオ', Meiryo, 'MS ゴシック', sans-serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, #ff9a9e, #a8edea);
    padding: 30px 20px;
    text-align: center;
    color: white;
}

.title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

/* Main content */
.main-content {
    padding: 30px 20px;
}

.selection-area {
    text-align: center;
    margin-bottom: 30px;
}

.selection-area h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

/* Radio buttons */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.radio-option:hover {
    background: #ff9a9e20;
    border-color: #ff9a9e;
    transform: translateY(-2px);
}

.radio-option input[type="radio"] {
    display: none;
}

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

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: #ff9a9e;
    background: #ff9a9e;
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Category select */
.category-select {
    margin-bottom: 30px;
}

.category-select h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

#category-select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#category-select:focus {
    outline: none;
    border-color: #a8edea;
    box-shadow: 0 0 0 3px rgba(168, 237, 234, 0.3);
}

/* Fortune button */
.fortune-btn {
    background: linear-gradient(135deg, #ff9a9e, #a8edea);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 280px;
}

.fortune-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.fortune-btn:active {
    transform: translateY(-1px);
}

/* Result area */
.result-area {
    text-align: center;
}

.result-card {
    background: white;
    border-radius: 15px;
    padding: 30px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid #ff9a9e20;
}

.result-card h2 {
    color: #ff9a9e;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.prompt-text {
    background: linear-gradient(135deg, #ff9a9e10, #a8edea10);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    border-left: 4px solid #ff9a9e;
}

.prompt-category {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 25px;
    opacity: 0.8;
}

/* Action buttons */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.action-buttons button {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

.copy-btn {
    background: #a8edea;
    color: white;
}

.copy-btn:hover {
    background: #7de3df;
    transform: translateY(-2px);
}

.twitter-btn {
    background: #1da1f2;
    color: white;
}

.twitter-btn:hover {
    background: #0d8bd9;
    transform: translateY(-2px);
}

.retry-btn {
    background: #ff9a9e;
    color: white;
}

.retry-btn:hover {
    background: #ff7a85;
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-area.show {
    animation: fadeIn 0.5s ease-out;
}

/* Copy success animation */
.copy-success {
    background: #28a745 !important;
    transform: scale(1.05);
}

/* Mobile responsive */
@media (max-width: 480px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    header {
        padding: 20px 15px;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .radio-group {
        gap: 10px;
    }
    
    .radio-option {
        padding: 12px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons button {
        min-width: auto;
    }
    
    .prompt-text {
        font-size: 1rem;
        padding: 15px;
    }
}

/* Loading animation */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}