/* Modern Authentication Styles for BTC-Lottery.io */

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

body {
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
    min-height: 100vh;
    height: 100vh;
/*   // background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    background: linear-gradient(139.73deg, #313D5C, #3D2A54);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Animated Background */
.auth-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 70%;
    left: 80%;
    animation-delay: -5s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 20%;
    left: 80%;
    animation-delay: -10s;
}

.shape-4 {
    width: 200px;
    height: 200px;
    top: 60%;
    left: 10%;
    animation-delay: -15s;
}

.shape-5 {
    width: 100px;
    height: 100px;
    top: 40%;
    left: 50%;
    animation-delay: -7s;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-100px) rotate(180deg);
        opacity: 0.3;
    }
    100% {
        transform: translateY(0px) rotate(360deg);
        opacity: 0.7;
    }
}

/* Auth Card */
.auth-card {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideUp 0.8s ease-out;
    margin: 0 auto;
}

.signup-card {
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

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

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.logo i {
    font-size: 32px;
    margin-right: 10px;
    color: #f7931a;
}

.auth-header h2 {
    font-size: 28px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.auth-header p {
    color: #718096;
    font-size: 16px;
}

/* Form Styles */
.auth-form {
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d3748;
    font-size: 14px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    color: #a0aec0;
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-wrapper input:valid {
    border-color: #48bb78;
}

.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    z-index: 2;
    padding: 4px;
}

.validation-icon {
    position: absolute;
    right: 16px;
    color: #48bb78;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.input-wrapper input:valid + .validation-icon {
    opacity: 1;
}

.input-help {
    font-size: 12px;
    color: #718096;
    margin-top: 4px;
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.strength-bars {
    display: flex;
    gap: 4px;
}

.strength-bars .bar {
    width: 20px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.strength-bars .bar.active {
    background: #48bb78;
}

.strength-bars .bar.medium {
    background: #ed8936;
}

.strength-bars .bar.weak {
    background: #f56565;
}

.strength-text {
    font-size: 12px;
    color: #718096;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
}

.checkbox-wrapper input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-wrapper input:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-wrapper input:checked + .checkmark::after {
    content: '\2713';
    position: absolute;
    top: -2px;
    left: 3px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Buttons */
.auth-btn {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.auth-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.auth-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

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

/* Social Login */
.divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
    color: #718096;
    font-size: 14px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
    z-index: 1;
}

.divider span {
    background: white;
    padding: 0 16px;
    position: relative;
    z-index: 2;
}

.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.social-btn {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    color: #4a5568;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.social-btn:hover {
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

.social-btn.google:hover {
    border-color: #ea4335;
    color: #ea4335;
}

.social-btn.metamask:hover {
    border-color: #f6851b;
    color: #f6851b;
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 20px;
}

.auth-footer p {
    color: #718096;
    font-size: 14px;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Features Section */
.auth-features {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 40px;
    z-index: 5;
    display: none !important
}

.feature {
    text-align: center;
    color: white;
    opacity: 0.9;
}

.feature i {
    font-size: 24px;
    margin-bottom: 8px;
    color: #f7931a;
}

.feature h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.feature p {
    font-size: 12px;
    opacity: 0.8;
}

/* Enhanced Responsive Design */
@media (max-width: 1024px) {
    .auth-container {
        padding: 15px;
    }
    
    .auth-features {
        gap: 30px;
    }
    
    .feature p {
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .auth-container {
        padding: 10px;
        height: auto;
        min-height: 100vh;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .auth-card {
        padding: 25px 20px;
        margin-bottom: 20px;
        max-height: none;
        width: 100%;
        max-width: 100%;
    }
    
    .signup-card {
        max-width: 100%;
        padding: 25px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .social-login {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .auth-features {
/*        position: relative;*/
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 20px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        padding: 0 10px;
    }
    
    .feature {
        flex: 1;
        min-width: 120px;
        max-width: 150px;
    }
    
    .feature h3 {
        font-size: 12px;
    }
    
    .feature p {
        font-size: 10px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .forgot-link {
        align-self: flex-end;
    }
}

@media (max-width: 640px) {
    body {
        overflow-y: auto;
    }
    
    .auth-container {
        padding: 15px 10px;
        justify-content: flex-start;
    }
    
    .auth-card {
        padding: 20px 15px;
        border-radius: 16px;
        margin-bottom: 15px;
    }
    
    .auth-header {
        margin-bottom: 25px;
    }
    
    .auth-header h2 {
        font-size: 24px;
        margin-bottom: 6px;
    }
    
    .auth-header p {
        font-size: 14px;
    }
    
    .logo {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .logo i {
        font-size: 26px;
    }
    
    .input-wrapper input {
        padding: 14px 14px 14px 44px;
        font-size: 16px;
    }
    
    .input-wrapper i {
        left: 14px;
    }
    
    .toggle-password {
        right: 14px;
    }
    
    .validation-icon {
        right: 14px;
    }
    
    .auth-btn {
        padding: 14px 20px;
        font-size: 15px;
        margin-bottom: 15px;
    }
    
    .social-btn {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .checkbox-wrapper {
        font-size: 13px;
    }
    
    .input-help {
        font-size: 11px;
    }
    
    .strength-text {
        font-size: 11px;
    }
    
    .auth-features {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .feature {
        max-width: none;
    }
    
    .feature i {
        font-size: 20px;
    }
    
    .feature h3 {
        font-size: 13px;
    }
    
    .feature p {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 10px 8px;
    }
    
    .auth-card {
        padding: 18px 12px;
        border-radius: 12px;
    }
    
    .signup-card {
        padding: 18px 12px;
    }
    
    .auth-header h2 {
        font-size: 22px;
    }
    
    .auth-header p {
        font-size: 13px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .logo i {
        font-size: 24px;
        margin-right: 8px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .input-wrapper input {
        padding: 12px 12px 12px 40px;
        font-size: 15px;
        border-radius: 10px;
    }
    
    .input-wrapper i {
        left: 12px;
        font-size: 14px;
    }
    
    .toggle-password, .validation-icon {
        right: 12px;
    }
    
    .auth-btn {
        padding: 12px 18px;
        font-size: 14px;
        border-radius: 10px;
    }
    
    .social-btn {
        padding: 10px 12px;
        font-size: 13px;
        border-radius: 10px;
    }
    
    .divider {
        margin: 15px 0;
        font-size: 13px;
    }
    
    .checkbox-wrapper {
        font-size: 12px;
    }
    
    .checkmark {
        width: 16px;
        height: 16px;
        margin-right: 6px;
    }
    
    .auth-footer p {
        font-size: 13px;
    }
    
    .password-strength {
        margin-top: 6px;
        gap: 6px;
    }
    
    .strength-bars .bar {
        width: 18px;
        height: 3px;
    }
}

@media (max-width: 360px) {
    .auth-container {
        padding: 8px 5px;
    }
    
    .auth-card {
        padding: 15px 10px;
    }
    
    .signup-card {
        padding: 15px 10px;
    }
    
    .auth-header h2 {
        font-size: 20px;
    }
    
    .logo {
        font-size: 16px;
    }
    
    .logo i {
        font-size: 22px;
    }
    
    .social-login {
        gap: 8px;
    }
    
    .social-btn span {
        display: none;
    }
    
    .social-btn {
        justify-content: center;
        min-width: 44px;
    }
    
    .auth-features {
        display: none;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .auth-container {
        padding: 10px;
        align-items: flex-start;
        overflow-y: auto;
    }
    
    .auth-card {
        margin: 10px auto;
        max-height: none;
    }
    
    .auth-features {
        display: none;
    }
    
    .floating-shapes {
        display: none;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .input-wrapper input {
        border-width: 1px;
    }
    
    .checkmark {
        border-width: 1px;
    }
}

/* Accessibility improvements for touch devices */
@media (pointer: coarse) {
    .toggle-password {
        padding: 8px;
        min-width: 44px;
        min-height: 44px;
    }
    
    .checkbox-wrapper {
        min-height: 44px;
        align-items: center;
    }
    
    .auth-btn {
        min-height: 48px;
    }
    
    .social-btn {
        min-height: 44px;
    }
}

/* Loading Animation */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Custom Scrollbar for Signup */
.signup-card::-webkit-scrollbar {
    width: 6px;
}

.signup-card::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.signup-card::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.signup-card::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}