/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;  
   
    background: url("assets/img/bg.png") no-repeat center bottom fixed;
    max-width: 100%;  
    max-height: 100%;
    background-size: cover;
    color: rgb(44,44,44);
    
    
    
}

/* Main container */
.registration-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 600px;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.registration-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Logo and header */
.minecraft-logo {
    text-align: center;
    margin-bottom: 30px;
}

.minecraft-logo h1 {
    color: #2c3e50;
    font-size: 2.5em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.minecraft-logo p {
    color: #7f8c8d;
    font-size: 1.1em;
}

/* Form groups */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.1em;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #2c3e50; /* Explicit text color */
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    color: #2c3e50; /* Ensure text stays visible on focus */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: #e74c3c;
    background: #fdf2f2;
    color: #721c24; /* Dark text for error state */
}

.form-group input:valid:not(:placeholder-shown) {
    border-color: #27ae60;
    background: #f2fdf2;
    color: #155724; /* Dark text for valid state */
}

/* Placeholder text styling */
.form-group input::placeholder {
    color: #7f8c8d;
    opacity: 1;
}

.form-group input:-ms-input-placeholder {
    color: #7f8c8d;
}

.form-group input::-webkit-input-placeholder {
    color: #7f8c8d;
}

/* Email specific styling */
.form-group input[type="email"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%237f8c8d' viewBox='0 0 16 16'%3E%3Cpath d='M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4zm2-1a1 1 0 0 0-1 1v.217l7 4.2 7-4.2V4a1 1 0 0 0-1-1H2zm13 2.383-4.758 2.855L15 11.114v-5.73zm-.034 6.878L9.271 8.82 8 9.583 6.728 8.82l-5.694 3.44A1 1 0 0 0 2 13h12a1 1 0 0 0 .966-.739zM1 11.114l4.758-2.876L1 5.383v5.73z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 45px;
    color: #2c3e50; /* Explicit text color for email input */
}

/* Buttons */
.register-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.register-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.register-btn:active {
    transform: translateY(0);
}

.register-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Success actions */
.success-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.login-btn, .register-another-btn {
    display: block;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.register-another-btn {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.login-btn:hover, .register-another-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Messages */
.message {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.message.show {
    opacity: 1;
    transform: translateY(0);
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

/* Requirements box */
.requirements {
    background: #e8f4fd;
    border: 2px solid #b8daff;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 25px;
}

.requirements h3 {
    color: #0056b3;
    margin-bottom: 10px;
    font-size: 1em;
}

.requirements ul {
    color: #0056b3;
    font-size: 0.9em;
    margin-left: 20px;
}

.requirements li {
    margin-bottom: 5px;
}

/* Loading state */
.loading {
    display: none;
    text-align: center;
    margin-top: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 480px) {
    .registration-container {
        padding: 25px;
        margin: 10px;
    }
    
    .minecraft-logo h1 {
        font-size: 2em;
    }
    
    .form-group input {
        padding: 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .register-btn {
        padding: 15px;
        font-size: 1.1em;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .registration-container {
        background: rgba(30, 30, 30, 0.95);
    }
    
    .minecraft-logo h1 {
        color: #ecf0f1;
    }
    
    .minecraft-logo p {
        color: #bdc3c7;
    }
    
    .form-group label {
        color: #ecf0f1;
    }
    
    .form-group input {
        background: #34495e;
        color: #ecf0f1; /* Explicit white text for dark mode */
        border-color: #34495e;
    }
    
    .form-group input:focus {
        background: #2c3e50;
        color: #ecf0f1; /* Keep text visible on focus in dark mode */
    }
    
    .form-group input::placeholder {
        color: #95a5a6;
    }
    
    .form-group input:invalid:not(:placeholder-shown) {
        background: #5d2e2e;
        color: #f8d7da;
        border-color: #e74c3c;
    }
    
    .form-group input:valid:not(:placeholder-shown) {
        background: #2e5d2e;
        color: #d4edda;
        border-color: #27ae60;
    }
}

/* Animation for form elements */
.form-group {
    animation: slideInUp 0.6s ease forwards;
    animation-delay: calc(var(--i) * 0.1s);
    opacity: 0;
}

.form-group:nth-child(1) { --i: 1; }
.form-group:nth-child(2) { --i: 2; }
.form-group:nth-child(3) { --i: 3; }
.form-group:nth-child(4) { --i: 4; }
.form-group:nth-child(5) { --i: 5; }
.register-btn { animation: slideInUp 0.6s ease forwards; animation-delay: 0.6s; opacity: 0; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus indicators for accessibility */
.form-group input:focus-visible,
.register-btn:focus-visible,
.login-btn:focus-visible,
.register-another-btn:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    body {
        background: white;
    }
    
    .registration-container {
        box-shadow: none;
        background: white;
        border: 1px solid #000;
    }
}