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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #181716;
    color: #fff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    color: #fff;
}

.player-wrapper {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 2rem auto;
}

.beat-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    justify-content: center;
}

.beat-btn {
    padding: 8px 20px;
    font-size: 0.85rem;
    background-color: #2a2727;
    color: #57504d;
    border: 1px solid #393433;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.beat-btn:hover {
    background-color: #393433;
    color: #fff;
}

.beat-btn.active {
    background-color: #453f3d;
    color: #fff;
    border-color: #57504d;
}

.player-container {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #393433;
    background-color: #2a2727;
}

.player-container iframe {
    display: block;
    border-radius: 8px;
}

.input-section {
    display: flex;
    gap: 12px;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.autocomplete-wrapper {
    flex: 1;
    min-width: 200px;
    position: relative;
}

#themeInput {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    background-color: #2a2727;
    color: #fff;
    border: 1px solid #393433;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
}

#themeInput::placeholder {
    color: #57504d;
}

#themeInput:focus {
    border-color: #453f3d;
    background-color: #2a2727;
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #2a2727;
    border: 1px solid #393433;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.suggestions.show {
    display: block;
}

.suggestion-item {
    padding: 12px 20px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.95rem;
}

.suggestion-item:hover,
.suggestion-item.active {
    background-color: #393433;
}

.suggestion-item:last-child {
    border-radius: 0 0 8px 8px;
}

/* Custom scrollbar for suggestions */
.suggestions::-webkit-scrollbar {
    width: 8px;
}

.suggestions::-webkit-scrollbar-track {
    background: #2a2727;
}

.suggestions::-webkit-scrollbar-thumb {
    background: #393433;
    border-radius: 4px;
}

.suggestions::-webkit-scrollbar-thumb:hover {
    background: #453f3d;
}

#generateBtn,
#randomBtn {
    padding: 16px 32px;
    font-size: 1rem;
    background-color: #393433;
    color: #fff;
    border: 1px solid #453f3d;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

#generateBtn:hover,
#randomBtn:hover {
    background-color: #453f3d;
    border-color: #57504d;
}

#generateBtn:active,
#randomBtn:active {
    transform: scale(0.98);
}

.words-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.words-container.show {
    opacity: 1;
}

.word {
    padding: 24px;
    background-color: #2a2727;
    border: 1px solid #393433;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 1px;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.word:hover {
    background-color: #393433;
    border-color: #453f3d;
}

@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }
    
    .input-section {
        flex-direction: column;
    }
    
    .word {
        font-size: 1.25rem;
    }
}
