/* Design 4 Button Utility Classes */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.button {
    background: #3a3a3a;
    border: none;
    border-left: 4px solid #8fbc8f;
    border-radius: 12px;
    padding: 16px 24px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    width: 90%;
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #cd5c5c, #d2b48c);
    border-radius: 0 12px 0 16px;
    opacity: 0.6;
}

.button:hover {
    border-left-color: #cd5c5c;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.button.active {
    border-left-color: #d2b48c;
    background: #404040;
    color: #d2b48c;
}

.button-big {
    background: #3a3a3a;
    border: none;
    border-left: 6px solid #8fbc8f;
    border-radius: 20px;
    padding: 32px;
    color: white;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 120px;
    width: 90%;
    text-align: left;
    margin-bottom: 10px;
}

.button-big::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #cd5c5c, #d2b48c);
    border-radius: 0 20px 0 40px;
    opacity: 0.7;
}

.button-big:hover {
    border-left-color: #cd5c5c;
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.button-big:active {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.button-big.active {
    border-left-color: #d2b48c;
    background: #404040;
    color: #d2b48c;
}

/* Special variations */
.button.primary {
    border-left-color: #cd5c5c;
    background: #404040;
}

.button.primary:hover {
    border-left-color: #d2b48c;
}

.button.secondary {
    border-left-color: #d2b48c;
    background: #383838;
}

.button.secondary:hover {
    border-left-color: #8fbc8f;
}

.button-big.primary {
    border-left-color: #cd5c5c;
    background: #404040;
}

.button-big.primary:hover {
    border-left-color: #d2b48c;
}

.button-big.secondary {
    border-left-color: #d2b48c;
    background: #383838;
}

.button-big.secondary:hover {
    border-left-color: #8fbc8f;
}

/* Progress bar for big buttons */
.button-big .progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 12px;
    position: relative;
    z-index: 2;
}

.button-big .progress-fill {
    height: 100%;
    background: rgba(255,255,255,0.8);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.button-big .subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin-top: 8px;
    position: relative;
    z-index: 2;
}

/* Homepage Cards using your existing class names */

/* Daily Words Card */
.homepage-button-daily-words {
    background: linear-gradient(135deg, #cd5c5c, #d4736e) !important;
    border-left: 6px solid #8fbc8f !important;
    border-radius: 20px;
    padding: 32px;
    color: white;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3) !important;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.homepage-button-daily-words::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #8fbc8f, #d2b48c);
    border-radius: 0 20px 0 60px;
    opacity: 0.7;
    z-index: 1;
}

.homepage-button-daily-words:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 48px rgba(0,0,0,0.4) !important;
    border-left-color: #d2b48c !important;
}

.homepage-button-daily-words:hover::before {
    background: linear-gradient(135deg, #d2b48c, #8fbc8f);
}

.daily-words-text {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
}

.daily-words-num {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    margin-top: 8px;
    position: relative;
    z-index: 2;
}

.daily-words-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 12px;
    position: relative;
    z-index: 2;
}

.daily-words-bar-fill {
    height: 100%;
    background: rgba(255,255,255,0.8);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Typing Game Card */
.homepage-button-game {
    background: linear-gradient(135deg, #4a90e2, #50e3c2) !important;
    border-left: 6px solid #8fbc8f !important;
    border-radius: 20px;
    padding: 32px;
    color: white;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3) !important;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.homepage-button-game::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #cd5c5c, #d2b48c);
    border-radius: 0 20px 0 60px;
    opacity: 0.7;
    z-index: 1;
}

.homepage-button-photo-vocab::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: rgba(0,0,0,0.3); */
    z-index: 1;
}

.homepage-button-game:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 48px rgba(0,0,0,0.4) !important;
    border-left-color: #cd5c5c !important;
}

.homepage-button-game:hover::before {
    background: linear-gradient(135deg, #d2b48c, #8fbc8f);
}

.game-text {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
}

/* Optional: Add game characters after the text */
/* .homepage-button-game::after {
    content: '🌱 🎯 🎮';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 20px;
    z-index: 2;
} */

/* User Generated Lessons Card */
.homepage-button-photo-vocab {
    background: linear-gradient(135deg, #4a90e2, #50e3c2) !important;
    /* background: linear-gradient(135deg, #f2c464, #e2b04a) !important; */
    /* background: linear-gradient(135deg, #2d1b69, #1a1a2e) !important; */
    border-left: 6px solid #8fbc8f !important;
    border-radius: 20px;
    padding: 32px;
    color: white;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3) !important;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.homepage-button-photo-vocab::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #cd5c5c, #d2b48c);
    border-radius: 0 20px 0 60px;
    opacity: 0.7;
    z-index: 1;
}

.homepage-button-photo-vocab::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: rgba(0,0,0,0.3); */
    z-index: 1;
}

.homepage-button-photo-vocab:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 48px rgba(0,0,0,0.4) !important;
    border-left-color: #cd5c5c !important;
}

.homepage-button-photo-vocab:hover::before {
    background: linear-gradient(135deg, #8fbc8f, #cd5c5c);
}

.photo-vocab-text {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
}

/* Add Thai text styling after the main text */
/* .homepage-button-photo-vocab .photo-vocab-text::after {
    content: '\A เรียนรู้ \A เซินอย';
    white-space: pre;
    font-size: 18px;
    color: #d2b48c;
    margin-top: 8px;
    font-weight: 500;
    display: block;
    line-height: 1.4;
} */

/* Thai Music Card */
.homepage-button-musicians {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), 
                linear-gradient(135deg, #d2b48c, #c9a876) !important;
    border-left: 6px solid #8fbc8f !important;
    border-radius: 20px;
    padding: 32px;
    color: white;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3) !important;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.homepage-button-musicians::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #cd5c5c, #d2b48c);
    border-radius: 0 20px 0 60px;
    opacity: 0.7;
    z-index: 1;
}

.homepage-button-musicians::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 27, 105, 0.3);
    z-index: 1;
}

.homepage-button-musicians:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 48px rgba(0,0,0,0.4) !important;
    border-left-color: #cd5c5c !important;
}

.homepage-button-musicians:hover::before {
    background: linear-gradient(135deg, #8fbc8f, #cd5c5c);
}

.musicians-text {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
}

/* Support for background images - add these classes if you want to use images */
.homepage-button-photo-vocab.with-image,
.homepage-button-musicians.with-image {
    background-blend-mode: overlay;
}

/* Override any existing button-big styles that might conflict */
.homepage-button-daily-words.button-big,
.homepage-button-game.button-big,
.homepage-button-photo-vocab.button-big,
.homepage-button-musicians.button-big {
    margin-bottom: 10px;
}

/* Ensure spacing between cards */
.homepage-button-daily-words + .homepage-button-game,
.homepage-button-game + .homepage-button-photo-vocab,
.homepage-button-photo-vocab + .homepage-button-musicians {
    margin-top: 8px;
}

.game-characters {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.character {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.character.green { background: #8fbc8f; }
.character.red { background: #cd5c5c; }
.character.purple { background: #9370db; }

.pro-features-container {
    background-color: #8fbc8f;
    border-radius: 20px;
    padding: 20px;
    /* margin-bottom: 6px; */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90%;

}

.feature-item-login {
    /* display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 4px solid #e74c3c;
    transition: all 0.2s ease; */
}

.feature-item-login {
    margin-top: 6px;
}

/* Styling for newUsernameInput */
#newUsernameInput {
    width: calc(90% - 20px); /* Match button width, adjust for padding */
    padding: 12px 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    color: #333;
    background-color: #f9f9f9;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    margin: 0 auto;
    margin-top: 10px;
    margin-bottom: 10px;
}

#newUsernameInput:focus {
    border-color: #8fbc8f;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1), 0 0 5px rgba(143, 188, 143, 0.5);
    outline: none;
}

/* Tablet breakpoint */
@media (max-width: 768px) {
    .homepage-button-daily-words.button-big,
    .homepage-button-game.button-big,
    .homepage-button-photo-vocab.button-big {
        margin-bottom: 0px;
    }


  }
  
  /* Desktop breakpoint */
  @media (min-width: 1024px) {

  }

/* Footer Styling */
.footer-container {
    text-align: center;
    padding: 20px;
    margin-top: 30px; /* Ensure some space above the footer */
    background-color: #333; /* Dark background for the footer */
    color: #f0f0f0; /* Light text color for contrast */
    font-size: 0.9em;
    border-top: 1px solid #444; /* Subtle top border */
}

.footer-container p {
    margin: 0;
}

.footer-container a {
    color: #8fbc8f; /* Link color to match a theme color */
    text-decoration: none;
}

.footer-container a:hover {
    text-decoration: underline;
}

.pro-button {
    background: linear-gradient(135deg, #8e44ad, #3498db);
    border: none;
    border-radius: 50px;
    padding: 18px 50px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    width: 100%;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(142, 68, 173, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 30px;
}

.pro-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(142, 68, 173, 0.6);
}

.pro-button:active {
    transform: translateY(0);
}

.pro-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.pro-button:hover::before {
    left: 100%;
}