/*
 * Fichier de style principal pour le projet Robox Mining
 * Thème sombre et dégradés de couleurs basés sur les captures d'écran
 */


/* 1. Définition des variables CSS et des polices */

@font-face {
    font-family: 'Inter Regular';
    src: url('../font/interregular.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter Bold';
    src: url('../font/interbold.ttf') format('truetype');
}

@font-face {
    font-family: 'Roboto Mono Regular';
    src: url('../font/robotomonoregular.ttf') format('truetype');
}

:root {
    --color-dark-bg: #121212;
    --color-card-bg: #1e1e1e;
    --color-text-primary: #ffffff;
    --color-text-secondary: #aaaaaa;
    --color-accent-start: #ff7e5f;
    /* Orange clair */
    --color-accent-end: #feb47b;
    /* Pêche */
    --gradient-primary: linear-gradient(90deg, var(--color-accent-start), var(--color-accent-end));
    --gradient-secondary: linear-gradient(90deg, #ff5f6d, #ffc371);
    /* Un autre dégradé pour les accents */
    --color-success: #4CAF50;
    --color-error: #f44336;
    --color-warning: #ff9800;
}


/* 2. Styles généraux */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter Regular', sans-serif;
    background-color: var(--color-dark-bg);
    color: var(--color-text-primary);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

a {
    color: var(--color-accent-end);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}


/* 3. Conteneur principal (simule l'écran de l'application mobile) */

.app-container {
    width: 100%;
    max-width: 450px;
    /* Taille typique d'un écran de téléphone */
    min-height: 100vh;
    background-color: #000000;
    /* Fond noir pour l'effet "app" */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}


/* 4. Styles d'authentification (login/register) */

.auth-container {
    padding: 20px;
    width: 100%;
    max-width: 400px;
    margin: auto;
    text-align: center;
}

.auth-title {
    font-family: 'Inter Bold', sans-serif;
    font-size: 2em;
    margin-bottom: 30px;
    color: var(--color-text-primary);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--color-text-secondary);
    font-size: 0.9em;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background-color: var(--color-card-bg);
    color: var(--color-text-primary);
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-accent-start);
}

.help-block {
    color: var(--color-error);
    font-size: 0.8em;
    margin-top: 5px;
    display: block;
}

.alert {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-size: 0.9em;
}

.alert-danger {
    background-color: rgba(244, 67, 54, 0.2);
    color: var(--color-error);
}

.alert-success {
    background-color: rgba(76, 175, 80, 0.2);
    color: var(--color-success);
}


/* 5. Boutons */

.btn {
    display: inline-block;
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    font-family: 'Inter Bold', sans-serif;
    font-size: 1.1em;
    cursor: pointer;
    transition: opacity 0.3s;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--color-text-primary);
    box-shadow: 0 4px 15px rgba(255, 126, 95, 0.4);
}

.btn-primary:hover {
    opacity: 0.9;
}


/* 6. Styles spécifiques à l'application (post-login) */

.dashboard-card {
    background-color: var(--color-card-bg);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.balance-card {
    background-image: url('../image/assets_png_med.png');
    /* Utiliser l'image de fond */
    background-size: cover;
    background-position: center;
    padding: 30px 20px;
    color: var(--color-text-primary);
}

.balance-card h3 {
    font-size: 1em;
    color: var(--color-text-secondary);
    margin-bottom: 5px;
}

.balance-card .rox-amount {
    font-family: 'Roboto Mono Regular', monospace;
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 5px;
}

.balance-card .usd-amount {
    font-size: 1.1em;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.mining-card {
    background: var(--gradient-primary);
    padding: 20px;
    color: var(--color-text-primary);
    position: relative;
    overflow: hidden;
}

.mining-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../image/roboxdrawable.png');
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: right center;
    opacity: 0.1;
}

.mining-card .timer {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 5px;
    font-family: 'Roboto Mono Regular', monospace;
    font-size: 0.9em;
}

.mining-card .creation-label {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
}

.mining-card .rox-created {
    font-family: 'Roboto Mono Regular', monospace;
    font-size: 1.5em;
    font-weight: bold;
    margin: 5px 0 10px 0;
}

.mining-card .speed {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.btn-accelerate {
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--color-text-primary);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.btn-accelerate i {
    margin-right: 10px;
}

.referral-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.referral-card .text-content {
    flex-grow: 1;
}

.referral-card .text-content p {
    font-size: 0.9em;
    color: var(--color-warning);
    margin-bottom: 10px;
}

.referral-card .megaphone {
    width: 80px;
    height: 80px;
    background-image: url('../image/robox.png');
    /* Placeholder, à remplacer par l'image du mégaphone */
    background-size: contain;
    background-repeat: no-repeat;
    margin-left: 10px;
}


/* Animations */

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.animate-pulse {
    animation: pulse 0.5s ease-in-out;
}


/* En-tête de page */


/* En-tête de page */

.page-header {
    padding: 20px;
    text-align: center;
    font-size: 1.2em;
    font-family: 'Inter Bold', sans-serif;
    border-bottom: 1px solid var(--color-card-bg);
}


/* Contenu de la page */

.page-content {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
}


/* Cartes (Cards) */

.card {
    background-color: var(--color-card-bg);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


/* Barre de navigation inférieure (Navbar) */

.navbar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px;
    background-color: var(--color-card-bg);
    border-top: 1px solid #333;
    position: sticky;
    bottom: 0;
    width: 100%;
}

.nav-item {
    color: var(--color-text-secondary);
    font-size: 0.8em;
    text-align: center;
    padding: 5px;
    transition: color 0.3s;
}

.nav-item.active {
    color: var(--color-accent-end);
}

.nav-item i {
    font-size: 1.5em;
    display: block;
    margin-bottom: 3px;
}

.nav-action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--color-text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    box-shadow: 0 4px 15px rgba(255, 126, 95, 0.6);
    position: relative;
    top: -10px;
    /* Pour le faire ressortir */
}


/* Utilisation des images d'assets */

.robox-logo {
    width: 150px;
    margin-bottom: 50px;
}

.robox-coin {
    width: 100px;
    margin-bottom: 50px;
}


/* Pour les icônes, nous utiliserons Font Awesome (à inclure dans header.php) */


/* Pour l'instant, les styles sont basés sur des classes génériques */


/* Les icônes seront ajoutées dans la phase 5 */