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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2d3748;
}

.subtitle {
    font-size: 1.3rem;
    color: #4a5568;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.encouragement-cards {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.encouragement-card {
    background: white;
    padding: 0.8rem 1.2rem;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #4a5568;
    border: 2px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.encouragement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.encouragement-card .emoji {
    font-size: 1.2rem;
}

.note {
    font-size: 0.85rem;
    color: #718096;
    font-style: italic;
}

.input-section {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.input-header {
    margin-bottom: 1.5rem;
}

.input-header h3 {
    font-size: 1.4rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.input-subtitle {
    color: #718096;
    font-size: 0.95rem;
}

#complaintInput {
    width: 100%;
    padding: 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 1.1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    background: #fafafa;
    min-height: 120px;
}

#complaintInput:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.convert-button {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1.2rem 2rem;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.convert-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
    background: linear-gradient(135deg, #ff5252 0%, #d63031 100%);
}

.convert-button:active {
    transform: translateY(-1px);
}

.convert-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.output-section {
    margin-bottom: 3rem;
    animation: celebrateIn 0.8s ease;
}

@keyframes celebrateIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    50% {
        transform: translateY(-5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.result-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border: 2px solid #667eea;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.result-card h3 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 1.5rem;
    text-align: center;
}

.idea-content {
    font-size: 1.6rem;
    line-height: 1.8;
    color: #2d3748;
    text-align: left;
    font-weight: 500;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #667eea;
}

.copy-button {
    padding: 0.8rem 1.5rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 1rem;
}

.copy-button:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.copy-button.copied {
    background: #48bb78;
    transform: scale(1.05);
}

.new-idea-button {
    padding: 0.8rem 1.5rem;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.new-idea-button:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .encouragement-cards {
        gap: 0.5rem;
    }
    
    .encouragement-card {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .input-section {
        padding: 2rem;
    }
    
    .result-card {
        padding: 2rem;
    }
    
    .idea-content {
        font-size: 1.4rem;
        padding: 1.2rem;
    }
    
    .copy-button,
    .new-idea-button {
        width: 100%;
        margin: 0.5rem 0;
    }
}

