:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1a1a1a;
    --accent-green: #d4ff00;
    --accent-green-dark: #b8e600;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border-color: #2a2a2a;
    --danger: #ef4444;
    --success: #22c55e;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(212, 255, 0, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(212, 255, 0, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(20, 20, 20, 1) 0%, rgba(10, 10, 10, 1) 100%);
    z-index: -2;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
}

.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-green);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: rgba(139, 92, 246, 0.5);
    bottom: -150px;
    right: -100px;
    animation-delay: -7s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: rgba(59, 130, 246, 0.5);
    top: 50%;
    right: 10%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -30px) rotate(5deg); }
    50% { transform: translate(-20px, 20px) rotate(-5deg); }
    75% { transform: translate(20px, 30px) rotate(3deg); }
}

.auth-card {
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: slideUp 0.5s ease-out;
}

.auth-card-register {
    max-width: 520px;
}

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

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.logo-img {
    max-width: 180px;
    max-height: 60px;
    object-fit: contain;
}

.logo-fallback {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-fallback i {
    color: var(--accent-green);
    width: 48px;
    height: 48px;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 520px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group label i {
    width: 16px;
    height: 16px;
    color: var(--accent-green);
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(212, 255, 0, 0.1);
}

.form-group.focused label {
    color: var(--accent-green);
}

.form-group small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

.password-input input {
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: var(--accent-green);
}

.toggle-password i {
    width: 18px;
    height: 18px;
}

.password-strength {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: var(--text-muted);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 80px;
    text-align: right;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    padding-left: 28px;
}

.remember-me input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    left: 0;
    width: 20px;
    height: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.remember-me:hover .checkmark {
    border-color: var(--accent-green);
}

.remember-me input:checked ~ .checkmark {
    background: var(--accent-green);
    border-color: var(--accent-green);
}

.remember-me input:checked ~ .checkmark:after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid var(--bg-primary);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember-me a {
    color: var(--accent-green);
    text-decoration: none;
}

.remember-me a:hover {
    text-decoration: underline;
}

.forgot-link {
    font-size: 0.85rem;
    color: var(--accent-green);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.forgot-link:hover {
    opacity: 0.8;
}

.btn-login {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-dark) 100%);
    border: none;
    border-radius: var(--radius-md);
    color: var(--bg-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 255, 0, 0.3);
}

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

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.auth-error,
.auth-success {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    animation: fadeIn 0.3s ease;
}

.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.auth-error i {
    color: var(--danger);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.auth-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.auth-success i {
    color: var(--success);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent-green);
    text-decoration: none;
    font-weight: 500;
}

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

.bonus-info {
    margin-top: 1.5rem;
}

.bonus-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(212, 255, 0, 0.1) 0%, rgba(212, 255, 0, 0.05) 100%);
    border: 1px solid rgba(212, 255, 0, 0.2);
    border-radius: var(--radius-md);
    color: var(--accent-green);
    font-size: 0.85rem;
    font-weight: 500;
}

.bonus-badge i {
    width: 18px;
    height: 18px;
}

.version-info {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .auth-container {
        padding: 1rem 0.75rem;
        justify-content: center;
        padding-top: 0;
    }

    .auth-card {
        padding: 1.5rem 1.25rem;
        max-width: 360px;
        border-radius: 14px;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    }

    .auth-card-register {
        max-width: 400px;
    }

    .auth-header {
        margin-bottom: 1rem;
    }

    .logo-img {
        max-width: 120px;
        max-height: 42px;
    }

    .auth-subtitle {
        font-size: 0.75rem;
    }

    .auth-form {
        gap: 0.75rem;
    }

    .form-group label {
        font-size: 0.75rem;
    }

    .form-group input {
        padding: 0.6rem 0.75rem;
        font-size: 0.82rem;
        border-radius: 8px;
    }

    .btn-login {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .btn-google {
        padding: 9px 14px;
        font-size: 13px;
        border-radius: 8px;
    }

    .auth-divider {
        margin: 10px 0;
        font-size: 11px;
    }

    .version-info {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        text-align: center;
        margin-top: 1.5rem;
    }

    .shape-1 { width: 250px; height: 250px; }
    .shape-2 { width: 200px; height: 200px; }
    .shape-3 { display: none; }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 0.75rem 0.5rem;
        justify-content: center;
        padding-top: 0;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .auth-card {
        padding: 1.25rem 1rem;
        max-width: 340px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.06);
    }

    .auth-header {
        margin-bottom: 0.75rem;
    }

    .logo {
        margin-bottom: 0.5rem;
    }

    .logo-img {
        max-width: 100px;
        max-height: 36px;
    }

    .logo-fallback {
        font-size: 1.3rem;
        gap: 0.4rem;
    }

    .logo-fallback i {
        width: 30px;
        height: 30px;
    }

    .auth-subtitle {
        font-size: 0.7rem;
    }

    .auth-form {
        gap: 0.625rem;
    }

    .form-group {
        gap: 0.25rem;
    }

    .form-group label {
        font-size: 0.72rem;
    }

    .form-group label i {
        width: 12px;
        height: 12px;
    }

    .form-group input {
        padding: 0.55rem 0.65rem;
        font-size: 0.8rem;
        border-radius: 7px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }

    .password-input input {
        padding-right: 2.25rem;
    }

    .toggle-password {
        right: 0.4rem;
        padding: 0.3rem;
    }

    .toggle-password i {
        width: 14px;
        height: 14px;
    }

    .password-strength {
        gap: 0.5rem;
    }

    .strength-text {
        font-size: 0.65rem;
        min-width: 55px;
    }

    .btn-login {
        padding: 0.6rem 0.75rem;
        font-size: 0.82rem;
        border-radius: 7px;
    }

    .btn-google {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 7px;
        gap: 8px;
    }

    .btn-google svg {
        width: 14px;
        height: 14px;
    }

    .auth-divider {
        margin: 8px 0;
        font-size: 11px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .remember-me {
        font-size: 0.72rem;
    }

    .forgot-link {
        font-size: 0.72rem;
    }

    .auth-error,
    .auth-success {
        padding: 0.5rem;
        font-size: 0.72rem;
        gap: 0.4rem;
    }

    .auth-error i,
    .auth-success i {
        width: 14px;
        height: 14px;
    }

    .auth-footer {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
    }

    .auth-footer p {
        font-size: 0.75rem;
    }

    .bonus-badge {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
    }

    .bonus-badge i {
        width: 14px;
        height: 14px;
    }

    .version-info {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        text-align: center;
        margin-top: 1rem;
        font-size: 0.65rem;
    }

    .shape-1 { width: 160px; height: 160px; filter: blur(40px); }
    .shape-2 { width: 120px; height: 120px; filter: blur(40px); }
    .shape-3 { display: none; }
    .bg-grid { background-size: 40px 40px; }
}

@media (max-width: 360px) {
    .auth-container {
        padding: 0.5rem 0.4rem;
        justify-content: center;
    }

    .auth-card {
        padding: 1rem 0.75rem;
        max-width: 300px;
    }

    .logo-img {
        max-width: 85px;
        max-height: 30px;
    }

    .auth-subtitle {
        font-size: 0.65rem;
    }

    .form-group input {
        padding: 0.5rem 0.6rem;
        font-size: 0.78rem;
    }

    .btn-login {
        padding: 0.55rem;
        font-size: 0.8rem;
    }

    .btn-google {
        padding: 7px 10px;
        font-size: 11px;
    }

    .auth-footer p {
        font-size: 0.7rem;
    }

    .checkmark {
        width: 16px;
        height: 16px;
    }

    .remember-me {
        padding-left: 22px;
        font-size: 0.7rem;
    }
}

@media (hover: none) and (pointer: coarse) {
    .form-group input {
        min-height: 38px;
    }

    .btn-login {
        min-height: 40px;
    }

    .btn-google {
        min-height: 38px;
    }

    .toggle-password {
        min-width: 34px;
        min-height: 34px;
    }

    .remember-me {
        min-height: 34px;
        display: flex;
        align-items: center;
    }

    .forgot-link {
        min-height: 34px;
        display: flex;
        align-items: center;
    }

    .btn-login:hover {
        transform: none;
    }

    .btn-google:hover {
        transform: none;
    }
}

@supports (padding: env(safe-area-inset-bottom)) {
    .auth-container {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .auth-container {
        padding-top: 2vh;
        justify-content: flex-start;
    }

    .auth-card {
        padding: 1.25rem 1.5rem;
    }

    .auth-header {
        margin-bottom: 0.75rem;
    }

    .auth-form {
        gap: 0.625rem;
    }

    .form-group input {
        padding: 0.5rem 0.75rem;
    }

    .btn-login {
        padding: 0.625rem;
    }

    .floating-shapes {
        display: none;
    }

    .version-info {
        display: none;
    }
}