@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* --- General & Layout --- */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-image: url('/images/background-texture.png');
    background-repeat: repeat;
    background-color: #0A140E;
    background-attachment: fixed;
    color: white;
}

.container {
    width: 100%;
    max-width: 480px;
    background-color: transparent; 
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

main {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
}

/* --- Header --- */
.main-header {
    background: linear-gradient(to right, #009a7c, #00b894);
    padding: 10px 15px;
    border-bottom: 1px solid #007a60;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo {
    height: 35px;
    width: auto;
}

.header-title {
    margin: 0;
    font-size: 1.4em;
    color: white;
    flex-grow: 1; 
    text-align: center;
}

.login-button {
    background-color: #00b894;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.login-button:hover {
    background-color: #009a7c;
}

.header-download-link {
    display: flex;
    align-items: center;
}

.header-download-icon {
    height: 28px;
    width: auto;
}

/* --- Ad Slider & Marquee (Home Page) --- */
.ad-slider-container {
    position: relative;
    width: 100%;
    margin: 0 auto 15px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.slides {
    position: relative;
    width: 100%;
    padding-top: 50%; /* Aspect Ratio 2:1 for the slider images */
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.ad-slider-container .marquee-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: transparent;
    margin-bottom: 0;
    z-index: 10;
    overflow: hidden;
}

.ad-slider-container .marquee-text {
    color: white;
    font-weight: bold;
    font-size: 1.1em;
    padding: 8px 0;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    display: inline-block;
    white-space: nowrap;
    animation: marquee 10s linear infinite;
}

@keyframes marquee {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}


/* --- Main Balance Display --- */
.main-balance-display {
    background: linear-gradient(145deg, #00b894, #007a60);
    border-radius: 12px;
    padding: 15px 20px;
    margin: 20px 0;
    text-align: center;
    border: 1px solid #00d8a1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.balance-label {
    color: #bbb;
    font-size: 0.9em;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.balance-amount {
    color: #ffc107;
    font-size: 2.2em;
    font-weight: bold;
}

/* --- Grid Menu (Home Page) --- */
.grid-menu {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding-top: 15px;
}

.grid-item {
    background-color: rgba(0, 184, 148, 0.8); /* Semi-transparent green */
    border: 1px solid #00b894;
    border-radius: 10px;
    text-align: center;
    padding: 20px 10px;
    text-decoration: none;
    color: white;
    transition: transform 0.2s, background-color 0.2s;
}

.grid-item:hover {
    transform: scale(1.05);
    background-color: #00b894;
}

.grid-item img {
    max-width: 60%;
    height: auto;
    margin-bottom: 10px;
}

.grid-item p {
    margin: 0;
    font-weight: bold;
    font-size: 1.1em;
}

/* --- Spin Page Styles --- */
.spin-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
}

.wheel-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('/images/spin-wheel-bg.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.wheel-pointer {
    position: absolute;
    left: 50%;
    top: -15px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #00b894;
    z-index: 10;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5));
}

#spinCanvas {
    position: absolute;
    width: 100%;
    height: 100%;
}

.center-spin-button {
    position: relative;
    z-index: 10;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 5px solid #fff;
    background-color: #00b894;
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    transition: transform 0.2s;
}

.center-spin-button:hover {
    transform: scale(1.1);
}

.center-spin-button:disabled {
    cursor: not-allowed;
    background-color: #888;
}

.spin-cost {
    margin-top: 15px;
    font-size: 1em;
    color: #aaa;
}

/* --- Profile Page Styles --- */
.profile-container {
    padding: 20px 15px;
}
.profile-container h2, .profile-container h3 {
    text-align: center;
    color: #eee;
    margin-bottom: 20px;
}
.profile-info-card,
.profile-form {
    background: linear-gradient(145deg, #00b894, #007a60);
    border: 1px solid #00d8a1;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}
.info-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #444;
}
.info-item:last-child {
    border-bottom: none;
}
.info-label {
    color: #fff;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 10px;
}
.info-value {
    color: #fff;
    font-weight: bold;
}
.logout-container {
    text-align: center;
}
.logout-button-main {
    display: inline-block;
    width: auto;
    text-align: center;
    margin-top: 20px;
    padding: 10px 25px;
    background-color: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}
.logout-button-main:hover {
    background-color: #c82333;
}
.message {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
}
.message.success {
    background-color: #28a745;
    color: #fff;
}
.message.error {
    background-color: rgba(184, 0, 0, 0.4);
    color: #fff;
}

/* --- Footer --- */
.main-footer {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0 5px 0;
    background: linear-gradient(to right, #009a7c, #00b894);
    border-top: 1px solid #007a60;
    flex-shrink: 0;
}

.main-footer a {
    color: white;
    text-decoration: none;
    font-size: 0.9em;
    padding: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.main-footer a:hover {
    color: #00b894;
}

.main-footer a i {
    font-size: 1.4em;
}

/* --- Forms (Login & Register) --- */
.login-form-container {
    padding: 30px 20px;
    text-align: center;
}

.login-form-container h2 {
    margin-bottom: 30px;
    font-size: 1.8em;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
}

.input-group input {
    width: 100%;
    padding: 12px;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 5px;
    color: white;
    font-size: 1em;
    box-sizing: border-box;
}

.submit-button {
    width: 100%;
    padding: 15px;
    background-color: #00b894;
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.submit-button:hover {
    background-color: #009a7c;
}

.form-link {
    margin-top: 25px;
    font-size: 0.9em;
    color: #ccc;
    text-align: center;
}

.form-link a {
    color: #00b894;
    text-decoration: none;
    font-weight: bold;
}

.form-link a:hover {
    text-decoration: underline;
}

.error-message {
    background-color: rgba(184, 0, 0, 0.4);
    color: #ffcdd2;
    border: 1px solid #b80000;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

