@font-face {
    font-family: 'Metropolis';
    src: url('/fonts/Metropolis-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Metropolis';
    src: url('/fonts/Metropolis-SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}

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

body {
    font-family: 'Metropolis', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

html {
    height: -webkit-fill-available;
}

.container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 28px;
    padding: 60px 40px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(255, 255, 255, 0.2);
    text-align: center;
    max-width: 580px;
    width: 100%;
    position: relative;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 28px;
    pointer-events: none;
}

.pronunciation-group {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 18px;
    margin-bottom: 40px;
    padding-top: 8px;
}

.pronunciation-text {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

button {
    border: none;
    border-radius: 20px;
    width: 56px;
    height: 56px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

button:hover {
    transform: scale(1.1) translateZ(0);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

button:active {
    transform: scale(0.95) translateZ(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

button svg {
    width: 24px;
    height: 24px;
    fill: white;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

button svg polygon {
    opacity: 1;
    transform: translateX(2px) translateZ(0);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

button svg rect {
    opacity: 0;
    transform: translateX(0) translateZ(0);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

button.playing svg polygon {
    opacity: 0;
}

button.playing svg rect {
    opacity: 1;
}

.name-display {
    font-size: 32px;
    font-weight: 600;
    color: #1C1C1C;
    letter-spacing: 0.4px;
}

.ipa {
    font-size: 18px;
    font-weight: 400;
    color: #6B6B6B;
    letter-spacing: 0.3px;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
}

audio {
    display: none;
}


.nav {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(107, 107, 107, 0.3);
}

.nav a {
    display: inline-block;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.nav a:hover {
    opacity: 0.8;
}

body.theme-deepak {
    background: linear-gradient(135deg, #2D3A5C 0%, #1E5A66 100%);
    background-color: #2D3A5C;
}

body.theme-deepak button {
    background: linear-gradient(135deg, #4A95B5 0%, #3A7A99 100%);
    transition: all 0.3s ease, filter 0.3s ease;
}

body.theme-deepak button:hover {
    filter: brightness(1.2);
}

body.theme-deepak button:active {
    filter: brightness(0.85);
}

body.theme-deepak .nav a {
    color: #2D6A8C;
}

body.theme-mantena {
    background: linear-gradient(135deg, #3B7D6F 0%, #2A5E57 100%);
    background-color: #3B7D6F;
}

body.theme-mantena button {
    background: linear-gradient(135deg, #52A39F 0%, #3D8A80 100%);
    transition: all 0.3s ease, filter 0.3s ease;
}

body.theme-mantena button:hover {
    filter: brightness(1.2);
}

body.theme-mantena button:active {
    filter: brightness(0.85);
}

body.theme-mantena .nav a {
    color: #4A9B8F;
}

@supports (-webkit-touch-callout: none) {
    body.theme-deepak {
        background: #2D3A5C;
    }
    
    body.theme-mantena {
        background: #3B7D6F;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 40px 20px;
    }

    .name-display {
        font-size: 20px;
    }

    h1 {
        font-size: 18px;
    }

    button {
        width: 50px;
        height: 50px;
    }
}
