:root {
    --primary-color: #FF725C;
    --secondary-color: #4ECDC4;
    --text-color: #2D3436;
    --bg-color: #F7F9FC;
    --card-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradient-start: #FF725C;
    --gradient-end: #FF9A8B;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Noto Sans Telugu', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.subtitle {
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 1.5rem;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.navigation-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 200px;
}

.goto-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#gotoInput {
    width: 100px;
    padding: 0.3rem 0.5rem;
    border: 2px solid var(--shadow-color);
    border-radius: 15px;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
}

#gotoInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 114, 92, 0.1);
}

#gotoBtn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

#gotoBtn:hover {
    background-color: rgba(255, 114, 92, 0.1);
    transform: scale(1.1);
}

.controls button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.controls button:hover {
    background-color: rgba(255, 114, 92, 0.1);
    transform: scale(1.1);
}

.controls button:active {
    transform: scale(0.95);
}

#cardCount {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 0.3rem;
}

.slider-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    padding: 0 2rem;
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--shadow-color);
    outline: none;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.slider::-webkit-slider-thumb:hover,
.slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 114, 92, 0.3);
}

.slider::-webkit-slider-runnable-track,
.slider::-moz-range-track {
    background: var(--shadow-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.slider:hover::-webkit-slider-runnable-track,
.slider:hover::-moz-range-track {
    background: rgba(255, 114, 92, 0.2);
}

.search-box {
    position: relative;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
    opacity: 0.5;
}

.search-box input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border: 2px solid var(--shadow-color);
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 114, 92, 0.1);
}

.card-container {
    perspective: 1000px;
    margin-bottom: 2rem;
    padding: 1rem;
}

.card {
    width: 100%;
    height: 300px;
    position: relative;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: box-shadow 0.3s ease;
}

.card-front:hover, .card-back:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
}

.word, .meaning {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.hint {
    font-size: 0.9rem;
    opacity: 0.7;
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.buttons button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 114, 92, 0.3);
}

.buttons button:active {
    transform: translateY(0);
}

footer {
    text-align: center;
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .word, .meaning {
        font-size: 1.8rem;
    }
    
    .card {
        height: 250px;
    }
    
    .buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .buttons button {
        justify-content: center;
    }
}
