*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.dictionary-table {
    width: 80%;    
    margin: 20px auto;       
    border-collapse: collapse;
}

.dictionary-table th {
    border: 1px solid #ddd;
    padding: 12px 14px;
    text-align: center;   
    background-color: #f5f5f5;
    font-weight: 600;
}

.dictionary-table td {
    border: 1px solid #ddd;
    padding: 12px 14px;   
    text-align: center;   
    font-size: clamp(1rem, 1.25vw, 1.25rem);
}


.dictionary-table tr:hover {
    background-color: #fafafa;
}

.dictionary-table tbody tr:nth-child(even) {
    background-color: #fcfcfc;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.table-wrapper {
    -webkit-overflow-scrolling: touch;
}

.letter-grid {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.letter-grid>a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: clamp(50px, 6vw, 70px);
    height: clamp(45px, 5vw, 60px);
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    background-color: #f8f9fa;
    color: #333;
    transition: 
        transform 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}


.letter-grid a:hover {
    background-color: var(--primary-blue);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.letter-grid a:active {
    transform: scale(0.95);
}


.ask-word-container, .right-parent-container{
    background-color: aliceblue;
    display: flex;
    height: 100%;
    flex: 1;
    flex-wrap: wrap;
    gap: 20px;
    padding: 5px;
    justify-content: space-evenly;
    align-content: stretch;
}  

.ask-word-container{
    flex: 2;
}

.right-parent-container{
    flex: 1;
    display: flex;
    gap: 20px;
    flex-direction: column;
    justify-content: center;
    align-items: center;

}
 

.day-word{
    display: flex;
    width: 100%;
    height: fit-content;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
}


.today-wrapper {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    padding: 1rem;
    display: flex;
    justify-content: center;
    width: 100%;
    height: fit-content;
    gap: 0.5rem;
    animation: fadeSlide 0.6s ease forwards;
    opacity: 0;
} 


.words-buttons-container{
    width: 100%;
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);

    column-gap: clamp(0.5rem, 1vw, 1rem);
    row-gap: clamp(0.5rem, 1vw, 1rem);
    justify-content: center;
    align-items: center;
    padding: 10px;
    animation: fadeSlide 0.6s ease forwards;
    opacity: 0;
}


.words-buttons-container>h2,
.today-word-card>h2,
.current-and-next span
{
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    text-shadow: 0 0.5px 0.5px black;
    color: var(--nav-btns);
    font-size: clamp(0.8rem, 3vh, 3rem);
    padding-bottom: 5px;
    border-bottom: 1px solid grey;
}



.card {
    width: clamp(3rem, 4vw, 4rem);
    height: clamp(3rem, 4vw, 4rem); 
    background-color: var(--primary-blue);
    color: white;
    font-size: clamp(0.5rem, 1.5vh, 1.5rem);
    font-weight: 600; 
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    text-decoration: none;
    transition: 0.3s ease;
    text-align: center;
    box-shadow: 1px 2px 1px black;
    cursor: pointer;
}
 
.card:hover {
    transform: scale(1.1);
    background-color: #606163;
}


.card:active {
    transform: scale(0.98);
    background-color: #171717;
}


.ask-dictionary-type {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: sans-serif;
    width: 100%;
    padding: clamp(0.25rem, 0.5vw, 0.5rem);
    margin: 2px auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    animation: fadeSlide 0.6s ease forwards;
    opacity: 0;
}

.ask-dictionary-type>label, .input-lang>label, .output-lang>label {
    font-weight: bold;
    text-align: center;
    color: var(--nav-btns);
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    text-shadow: 0 0.5px 0.5px black;
    transition: 0.3s ease;
}


.select-wrapper {
    position: relative;
    text-align: center;
}

select {
    width: clamp(7rem, 10vw, 10rem);
    padding: clamp(6px, 0.8vw, 12px);
    border-radius: 8px;
    border: 2px solid #4da6ff;
    background-color: white;
    font-size: 0.9rem;
    cursor: pointer;
    appearance: none;
    transition: all 0.3s ease;
}

.select-wrapper::after {
    content: "▼";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 0.7rem;
    color: #4da6ff;
    transition: 0.3s ease;
}

select:hover {
    border-color: #1a8cff;
    box-shadow: 0 0 8px rgba(77, 166, 255, 0.4);
}

select:focus{
    outline: none;
    border-color: #ff9933;
    box-shadow: 0 0 12px rgba(255, 153, 51, 0.5);
    transform: scale(1.02);
}





select:focus + * ,
select:focus ~ .select-wrapper::after {
    transform: translateY(-50%) rotate(180deg);
}



.criteria{
    display: flex;
    width: 100%;
    justify-content: center; 
    align-items: center;
    gap: 10px;
}

.input-lang, .output-lang{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}


.arrow{
    flex-grow: 1;        
    flex-shrink: 1;      
    flex-basis: 50px;   
    max-width: 200px;
    position: relative;
    height: 2px;
    background: black;
    align-self: center;
    margin: 0 10px;
}
 
.arrow::after{
    content: "";
    position: absolute;
    right: 0;
    top: -4px;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid black; 
}


.word-show-container {
    display: flex;
    width: 100%;
    justify-content: space-between;    
    align-items: stretch;
    gap: 15px;
} 

.word-card, .today-word-card {
    flex: 1;
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    animation: fadeSlide 0.6s ease forwards;
    opacity: 0;
    padding: 5px;
}

.word-card{
    display: flex;
    flex-direction: column;
}


.today-word-card{
    width: 100%;
}    

.word-table, .today-word-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.word-table{
    flex: 1;
}
 
.prev-next-btns{
    padding: 5px 0;
    display: flex;
    margin: 2px;
    border-radius: 15px;
    justify-content: space-evenly;
    align-items: center;
}


.word-table th, .today-word-table th {
    text-align: left;
    padding: clamp(0.8rem, 1.2vw, 1.2rem);
    background: #f0f4ff;
    color: #333;
    width: 20%;
} 

.word-table td,
.today-word-table td{
    padding: 10px;
    padding-left: 20px;
    background: rgb(252, 252, 252);
    font-size: clamp(0.9rem, 1.2vw, 1.2rem);
} 

.today-word-table th,
.today-word-table td{
    border-bottom: 0.2px solid var(--nav-btns);
} 


.word-table tr:not(:last-child) {
    border-bottom: 1px solid #eee;
}

.word-table tr:hover td {
    background: #eef3ff;
    transition: 0.3s;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.word-table tr:nth-child(1) td,
.today-word-table tr:nth-child(1) td{
    color: var(--primary-blue);
    font-weight: bold;
    font-size: clamp(0.8rem, 1vw, 1rem);
} 

.word-table tr th,
.today-word-table tr th{
    font-weight: bold;
    color: black;
    font-size: clamp(0.75rem, 1.1vw, 1.1rem);
} 


.current-and-next {
    flex: 1;
    padding: 0.2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);

    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(0.5rem, 2vw, 2rem);

    animation: fadeSlide 0.6s ease forwards;
    opacity: 0;
}

/* .current-and-next span {
    display: block;
    text-decoration: underline;
    text-align: center;    
    font-weight: bold;
    color: var(--nav-btns);
    font-size: clamp(0.9rem, 1.2vw, 1.2rem);
} */

/* .current-and-next .status-text {
    padding: 5px 0;
    text-align: center;
    color: var(--primary-blue);
    font-weight: bold;
    font-size: clamp(0.7rem, 1vw, 1rem);
} */

.action-btn {
    display: block;
    align-self: center;
    padding: clamp(.25rem, 0.8vw, 0.8rem);
    margin: 8px 0;
    border-radius: 10px;
    color: var(--text-white);
    background-color: var(--nav-btns);
    transition: all 0.2s ease;
    width: clamp(150px, 30vw, 300px);
    font-size: 15px;
}  

.action-btn:hover {
    background-color: var(--primary-blue);
    transform: translateY(-1px);
}

.action-btn-container{
    display: flex;
    gap: 15px;
}


.today-wrapper>div{
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
}

.today-heading {
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 25px;
    color: var(--nav-btns);
    border-bottom: 1px solid green;
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    margin-bottom: 10px;
}


.today-words {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
} 



.word-btn {
    display: inline-block;
    padding: clamp(0.4rem, 1vw, 0.8rem) clamp(0.8rem, 2vw, 1.2rem);
    border-radius: 8px;

    cursor: pointer;
    background: #b8cbff;
    color: var(--primary-blue);
    font-weight: 600;

    font-size: clamp(0.5rem, 1vw, 1rem);
    width: clamp(50px, 9vw, 160px); 

    transition: all 0.3s ease;
} 


.active-letter {
    background-color: var(--nav-back);
    color: white;
}



.login-caller, .prev-next-btns button {
    display: flex;
    text-align: center;
    justify-content: center;
    align-items: center;
    background: #b8cbff;
    width: clamp(110px, 20vw, 250px);
    color: var(--primary-blue);
    text-decoration: none;
    font-size: clamp(0.7rem, 1.1vw, 1.5rem);
    padding: 0.5em 0;
    border: 1px solid black;
    height: 40px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex: 0 0 auto;

}

.word-btn:hover, .login-caller:hover {
    background-color: var(--primary-blue);
    color: white;
    transform: translateY(-3px);
}

.prev-next-btns button{
    width: clamp(80px, 10vw, 200px);
    background-color: var(--nav-btns);
    color: var(--text-white);
    font-size: clamp(0.7rem, 1vw, 1.5rem);
}


.prev-next-btns button:hover{
    background-color: var(--primary-blue);
    transform: translateY(-1px);
}


.word-container {
  display: flex;
  align-items: center;
  gap: 10px;
} 

.audio-icon {
  cursor: pointer;
  font-size: 18px;
  color: #555;
  transition: all 0.2s ease;
}

.audio-icon:hover {
  color: #007bff;
  transform: scale(1.2);
}

.audio-icon:active {
  transform: scale(0.95);
}