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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

main {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
    margin-bottom: 30px;
}

.input-section, .result-section {
    padding: 30px;
}

h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

#dreamInput {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.3s ease;
}

#dreamInput:focus {
    outline: none;
    border-color: #667eea;
}

button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

button:active {
    transform: translateY(0);
}

.secondary-btn {
    background: #f0f0f0;
    color: #666;
    box-shadow: none;
}

.secondary-btn:hover {
    background: #e0e0e0;
    box-shadow: none;
}

.loading {
    color: #667eea;
    font-weight: bold;
}

.hidden {
    display: none;
}

.result-section {
    animation: fadeIn 0.5s ease-in;
}

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

.result-content {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.dream-text, .analysis-text {
    margin-bottom: 20px;
}

.dream-text h3, .analysis-text h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

#dreamText {
    font-style: italic;
    color: #666;
    background: white;
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

#analysisText {
    line-height: 1.8;
    color: #444;
}

footer {
    text-align: center;
    color: white;
    opacity: 0.7;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .input-section, .result-section {
        padding: 20px;
    }
    
    button {
        width: 100%;
        margin-top: 20px;
    }
}