/* Modern CSS Reset and Variables */
:root {
    --primary-color: #c17f59;  /* Rich coffee brown */
    --primary-hover: #a66b48;  /* Darker coffee */
    --secondary-color: #8b5e3c;  /* Mocha */
    --text-color: #e0d3c5;  /* Cream */
    --light-text: #f5f5f5;  /* Light cream */
    --background: #2c1810;  /* Dark coffee */
    --card-bg: #3d2314;  /* Espresso */
    --input-bg: #4a2b1a;  /* Dark roast */
    --border-color: #5c3624;  /* Medium roast */
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--background), #1a0f0a);
    min-height: 100vh;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    background: var(--background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
    color: var(--text-color);
}

.gradient-text {
    background: linear-gradient(135deg, #c17f59, #8b5e3c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.subtitle {
    text-align: center;
    color: var(--light-text);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.input-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--input-bg);
    color: var(--text-color);
    width: 100%;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.2);
}

input[type="text"]::placeholder {
    color: var(--light-text);
    opacity: 0.7;
}

button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    background: var(--primary-color);
    color: var(--text-color);
    white-space: nowrap;
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.secondary-btn {
    background: var(--secondary-color);
    margin-top: 1rem;
}

.secondary-btn:hover {
    background: #7a4f32;
}

.result-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
    animation: slideUp 0.5s ease-out;
    border: 1px solid var(--border-color);
}

.score-container {
    text-align: center;
    margin-bottom: 2rem;
}

.score {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 1rem 0;
}

.emoji {
    font-size: 3rem;
    margin: 1rem 0;
    animation: bounce 1s infinite;
}

.coffee-suggestion {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.coffee-suggestion-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.coffee-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.coffee-description {
    color: var(--light-text);
    margin-bottom: 1rem;
}

.tracks-list {
    margin-top: 2rem;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.track-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.track-item:last-child {
    border-bottom: none;
}

.track-item:hover {
    background: var(--input-bg);
}

.track-name {
    font-weight: 600;
    color: var(--text-color);
}

.track-artist {
    color: var(--light-text);
    font-size: 0.9rem;
}

.recipe-container {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    animation: slideUp 0.3s ease-out;
    border: 1px solid var(--border-color);
}

.recipe-details {
    color: var(--text-color);
}

.recipe-details h5 {
    color: var(--primary-color);
    margin: 1rem 0 0.5rem;
    font-size: 1.1rem;
}

.recipe-details ul, .recipe-details ol {
    margin-left: 1.5rem;
    padding-left: 0;
}

.recipe-details li {
    margin: 0.5rem 0;
    line-height: 1.6;
    color: var(--light-text);
}

.recipe-details ul li {
    list-style-type: disc;
}

.recipe-details ol li {
    list-style-type: decimal;
}

.error {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
    text-align: center;
    animation: shake 0.5s ease-in-out;
}

.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Responsive Design */
@media (max-width: 640px) {
    body {
        padding: 1rem;
    }
    
    .container {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .input-section {
        flex-direction: column;
    }
    
    button {
        width: 100%;
    }

    .result-section {
        padding: 1.5rem;
    }

    .score {
        font-size: 2.5rem;
    }

    .emoji {
        font-size: 2.5rem;
    }

    .coffee-title {
        font-size: 1.25rem;
    }
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 24, 16, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--border-radius);
}

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--card-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Social Sharing Styles */
.social-sharing {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.social-sharing h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    text-align: center;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    color: white;
}

.share-btn svg {
    width: 20px;
    height: 20px;
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.twitter:hover {
    background: #1a8cd8;
}

.share-btn.facebook {
    background: #4267B2;
}

.share-btn.facebook:hover {
    background: #365899;
}

.share-btn.whatsapp {
    background: #25D366;
}

.share-btn.whatsapp:hover {
    background: #22c35e;
}

@media (max-width: 640px) {
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        width: 100%;
        justify-content: center;
    }
}

.creator-tag {
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin: 1rem auto;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.5s ease-out;
    max-width: fit-content;
}

.profile-picture {
    width: 120px;
    height: 120px;
    margin: 1rem auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.5s ease-out;
    background-color: var(--card-bg);
}

.profile-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-picture:hover img {
    transform: scale(1.1);
}

.made-by {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    color: var(--light-text);
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

.made-by:hover {
    opacity: 1;
    color: var(--primary-color);
} 