:root {
    --primary: #d35400;
    --primary-light: #e67e22;
    --primary-dark: #a04000;
    --accent: #f39c12;
    --bg-gradient: linear-gradient(135deg, #f39c12 0%, #d35400 100%);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-dark: #2c3e50;
    --text-light: #ecf0f1;
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--text-dark);
}

.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
    width: 100%;
    max-width: 900px;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

header {
    padding: 30px 40px 20px;
    text-align: center;
}

.logo-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.header-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(211, 84, 0, 0.2);
    animation: pulse 4s infinite ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 8px;
    letter-spacing: -1px;
}

header p {
    color: var(--text-dark);
    opacity: 0.8;
    font-size: 1.1rem;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 0 40px;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-dark);
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(211, 84, 0, 0.3);
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
}

.content-section {
    padding: 0 40px 40px;
    flex-grow: 1;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Converter Form Styles */
.converter-form {
    display: grid;
    gap: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-dark);
}

textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(211, 84, 0, 0.1);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.checkbox-card {
    background: rgba(255, 255, 255, 0.4);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.checkbox-card:hover {
    background: rgba(255, 255, 255, 0.6);
}

.checkbox-card input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-card span {
    font-weight: 500;
}

.action-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
}

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-grow: 1;
}

.primary-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(211, 84, 0, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
}

.primary-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* API Key Input */
.api-key-container {
    position: relative;
    width: 100%;
}

.api-key-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.5);
    font-family: monospace;
}

/* History Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.proverb-card {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.proverb-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timestamp {
    font-size: 0.75rem;
    color: var(--text-dark);
    opacity: 0.5;
    font-weight: 500;
}

.proverb-card:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.proverb-text {
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 500;
    color: var(--text-dark);
}

.card-actions {
    display: flex;
    justify-content: flex-end;
}

.play-btn {
    padding: 8px 16px;
    border-radius: 100px;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.play-btn.asante {
    background: #FFB300; /* Asante Gold */
    box-shadow: 0 4px 12px rgba(255, 179, 0, 0.2);
}

.play-btn.akuapem {
    background: #2E7D32; /* Akuapem Green */
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
}

.play-btn:hover {
    transform: translateY(-2px) scale(1.05);
    filter: brightness(1.1);
}

.play-btn.asante:hover {
    box-shadow: 0 6px 15px rgba(255, 179, 0, 0.4);
}

.play-btn.akuapem:hover {
    box-shadow: 0 6px 15px rgba(46, 125, 50, 0.4);
}

.play-btn:active {
    transform: translateY(0) scale(0.98);
}

.play-btn i {
    width: 16px;
    height: 16px;
    transition: all 0.3s ease;
}

.play-btn.loading i,
.play-btn.playing i {
    display: none;
}

.play-btn .btn-loader {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.play-btn.loading .btn-loader {
    display: block;
}

.play-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.play-btn span {
    white-space: nowrap;
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer */
footer {
    padding: 20px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.6;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.8rem;
    }

    .glass-container {
        min-height: auto;
    }

    .content-section {
        padding: 0 20px 20px;
    }

    .tabs {
        padding: 0 20px;
        flex-direction: column;
        gap: 10px;
    }
}

/* Result Container */
.result-container {
    margin-top: 30px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-header {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-header h3 {
    color: var(--primary-dark);
    font-size: 1.2rem;
}

.audio-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.audio-card {
    background: white;
    padding: 20px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dialect-name {
    font-weight: 700;
    color: var(--primary);
    text-transform: capitalize;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.audio-player {
    width: 100%;
    height: 40px;
}

.download-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 4px;
    transition: color 0.2s;
}

.download-link:hover {
    color: var(--primary);
}

/* Notification System */
.notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    z-index: 2000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    pointer-events: none;
    opacity: 0;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.notification i {
    font-size: 1.2rem;
}

.notification.success i {
    color: #10b981;
}

.notification.error i {
    color: #ef4444;
}

.notification.info i {
    color: #3b82f6;
}

/* Copy Button Styles */
.copy-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #904324;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.4);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* Copy button for history cards */
.proverb-card .copy-btn {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.proverb-card .copy-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--primary);
    border-color: rgba(211, 84, 0, 0.2);
}

.proverb-actions {
    display: flex;
    gap: 0.5rem;
}

/* Update Result Text spacing */
#resultProverb {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}