/* assets/css/style.css */

/* --- Import Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;700&family=Inter:wght@400;500&display=swap');

/* --- CSS Variables (Design System) --- */
:root {
    --primary-dark: #1A3A3A;
    --primary-light: #F5F7FA;
    --accent-green: #00BFA5;
    --accent-silver: #E0E0E0;
    --text-dark: #333333;
    --text-light: #FFFFFF;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* --- Global Reset & Base Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--primary-light);
    color: var(--text-dark);
    line-height: 1.6;
}

main {
    min-height: calc(100vh - 80px - 70px);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* --- Header & Navigation --- */
header {
    background-color: #FFFFFF;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

nav .logo {
    display: flex;
    align-items: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 24px;
    color: var(--primary-dark);
    text-decoration: none;
}

nav .logo img {
    height: 40px;
    margin-right: 10px;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--accent-green);
}

/* --- Buttons --- */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent-green);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: #00a791;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 191, 165, 0.3);
}

/* --- Home Page: Hero Section --- */
.hero {
    text-align: center;
    padding: 80px 20px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 48px;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

/* --- Home Page: Features Section --- */
.features {
    padding: 60px 20px;
    background-color: #FFFFFF;
}

.features h2 {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 36px;
    color: var(--primary-dark);
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--primary-light);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

.feature-card .icon {
    font-size: 40px;
    color: var(--accent-green);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    margin-bottom: 10px;
}

/* --- Authentication Forms --- */
.auth-container {
    max-width: 400px;
    margin: 60px auto;
    padding: 40px;
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.auth-form {
    display: none;
}

.auth-form.active-form {
    display: block;
}

.auth-form h2 {
    font-family: var(--font-heading);
    text-align: center;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.auth-form p {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 2px rgba(0, 191, 165, 0.2);
}

.btn.full-width {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    text-align: center;
    margin-top: 15px !important;
    font-weight: 500;
}

.success-message {
    color: #2ecc71;
    font-size: 14px;
    text-align: center;
    margin-top: 15px !important;
    font-weight: 500;
}

.form-footer {
    margin-top: 25px;
    text-align: center;
}
.form-footer p {
    font-size: 14px;
    margin-bottom: 5px;
}
.form-footer a {
    color: var(--accent-green);
    text-decoration: none;
    font-weight: 500;
}
.form-footer a:hover {
    text-decoration: underline;
}

/* --- Phone Input Library Styling --- */
.iti {
    width: 100%;
}

/* --- Password Toggle Icon Styling --- */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 15px;
    cursor: pointer;
    font-size: 24px;
    user-select: none;
}

/* --- Footer --- */
footer {
    background-color: var(--primary-dark);
    color: var(--text-light);
    text-align: center;
    padding: 25px 0;
}

/* --- Dashboard --- */
.dashboard-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.dashboard-header h1 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    font-size: 36px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.dashboard-card {
    background-color: #FFFFFF;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.card-icon {
    font-size: 36px;
    background-color: var(--primary-light);
    height: 60px;
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.card-content {
    flex-grow: 1;
}

.card-title {
    display: block;
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.card-value {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-dark);
}

.card-currency {
    font-size: 16px;
    color: #999;
    margin-left: 5px;
}

.referral-code-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#copy-code-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}
#copy-code-btn:hover {
    background-color: var(--primary-light);
}

.claim-card .card-content {
    text-align: center;
}

#claim-button {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-heading);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background-color: var(--accent-green);
    color: #fff;
    transition: all 0.3s ease;
}

#claim-button:hover:not(:disabled) {
    background-color: #00a791;
    transform: scale(1.02);
}

#claim-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#claim-timer {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    min-height: 20px;
}

/* Transactions Section */
.transactions-section {
    background-color: #FFFFFF;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.transactions-section h2 {
    font-family: var(--font-heading);
    margin-bottom: 20px;
    color: var(--primary-dark);
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}
.transaction-item:last-child {
    border-bottom: none;
}
.transaction-details {
    display: flex;
    align-items: center;
    gap: 15px;
}
.transaction-icon {
    font-size: 20px;
}
.transaction-info .type {
    font-weight: 500;
}
.transaction-info .date {
    font-size: 12px;
    color: #999;
}
.transaction-amount {
    font-weight: 700;
}
.transaction-amount.gain {
    color: #27ae60;
}
.transaction-amount.loss {
    color: #c0392b;
}