* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Roboto', sans-serif;
    background: #0d1b2a;
    color: #ffffff;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 300%;
    height: 300%;
    background: url('https://www.transparenttextures.com/patterns/stardust.png') repeat;
    animation: moveStars 50s linear infinite;
    opacity: 0.2;
    z-index: -1;
}

@keyframes moveStars {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-50%, -50%); }
}

/* Header */
header {
    background: rgba(0,0,0,0.3);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    height: 60px;
    width: auto;
}

.main-nav {
    display: flex;
    gap: 30px;
}

.main-nav a {
    color: #ffffff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background 0.3s, transform 0.3s;
    font-weight: 500;
}

.main-nav a:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.main-nav a.active {
    background: rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.1);
    padding: 8px 15px;
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.2);
}

.user-role {
    font-size: 0.8em;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.2);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: #2ecc71;
    color: white;
}

.btn-primary:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.page-title {
    text-align: center;
    margin-bottom: 40px;
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    color: #2ecc71;
    text-shadow: 0 0 20px rgba(46, 204, 113, 0.5);
}

/* Cards */
.card {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(46, 204, 113, 0.3);
}

.card h3 {
    color: #2ecc71;
    margin-bottom: 15px;
    font-family: 'Orbitron', sans-serif;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2ecc71;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #2ecc71;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
}

.form-control::placeholder {
    color: rgba(255,255,255,0.5);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.table th {
    background: rgba(46, 204, 113, 0.3);
    font-weight: 600;
    color: #2ecc71;
}

.table tr:hover {
    background: rgba(255,255,255,0.05);
}

/* Server Status */
.server-card {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 10px;
    width: 260px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    z-index: 1;
}

.server-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.3);
    z-index: 10;
}

.server-card h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.status-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.online   { background-color: #2ecc71; animation: blink 1s infinite; }
.offline  { background-color: #e74c3c; animation: blink 1s infinite; }
.checking { background-color: #f1c40f; animation: blink 1s infinite; }

@keyframes blink { 50% { opacity: 0.2; } }

.servers-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid;
}

.alert-success {
    background: rgba(46, 204, 113, 0.1);
    border-color: #2ecc71;
    color: #2ecc71;
}

.alert-danger {
    background: rgba(231, 76, 60, 0.1);
    border-color: #e74c3c;
    color: #e74c3c;
}

.alert-info {
    background: rgba(52, 152, 219, 0.1);
    border-color: #3498db;
    color: #3498db;
}

/* Discord Invite */
.discord-invite {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    gap: 12px;
}

.discord-invite .discord-icon {
    width: 32px;
    height: 32px;
}

.discord-invite a {
    text-decoration: none;
    color: #7289da;
    font-weight: bold;
    background: rgba(114, 137, 218, 0.1);
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid #7289da;
    transition: background 0.3s, transform 0.3s;
}

.discord-invite a:hover {
    background: rgba(114, 137, 218, 0.3);
    transform: scale(1.05);
}

/* Footer */
footer {
    text-align: center;
    padding: 15px;
    background: rgba(0,0,0,0.5);
    font-size: 0.9rem;
    width: 100%;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background: #0d1b2a;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #2ecc71;
}

.modal-content h2 {
    color: #2ecc71;
    margin-bottom: 20px;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
}

/* Styles pour les éléments de sécurité */
.captcha-field {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #3498db;
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
}

.captcha-field label {
    color: #3498db;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.security-info {
    background: rgba(52, 152, 219, 0.1);
    border-left: 4px solid #3498db;
    padding: 10px;
    margin: 10px 0;
    border-radius: 0 5px 5px 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.rate-limit-warning {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid #e74c3c;
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
    color: #e74c3c;
    font-weight: bold;
}

/* Animation pour les erreurs de sécurité */
.security-error {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Styles pour les champs de captcha */
input[name="captcha_answer"] {
    width: 100px !important;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
}

/* Indicateur de sécurité */
.security-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(46, 204, 113, 0.9);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 1000;
    display: none;
}

.security-indicator.show {
    display: block;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .server-card {
        width: 90%;
    }
    
    .servers-container {
        flex-direction: column;
        align-items: center;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #2ecc71;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Email Info */
.email-info {
    background: rgba(46, 204, 113, 0.1);
    border-left: 4px solid #2ecc71;
    padding: 10px;
    margin: 10px 0;
    border-radius: 0 5px 5px 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.email-info small {
    display: block;
    line-height: 1.4;
}
