html {
    overflow-y: auto;
    overflow-x: hidden;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
    background: rgb(111, 171, 175);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #1d1d1f;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 80px 80px, 120px 120px, 60px 60px;
    pointer-events: none;
    opacity: 0.8;
    animation: patternFloat 20s linear infinite;
}

@keyframes patternFloat {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(60px) saturate(1.8);
    border-radius: 28px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 8px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(111, 171, 175, 0.1);
    padding: 56px 40px 70px 40px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 10;
    border: 1px solid rgba(111, 171, 175, 0.2);
    overflow: hidden;
    min-height: 500px;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.8s;
}

.container:hover::before {
    left: 100%;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgb(111, 171, 175) 0%, rgb(85, 145, 150) 100%);
    border-radius: 24px;
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    font-weight: 600;
    box-shadow: 
        0 8px 32px rgba(111, 171, 175, 0.3),
        0 4px 16px rgba(85, 145, 150, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    animation: logoFloat 3s ease-in-out infinite;
}

.logo::before {
    content: '⏰';
    font-size: 36px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    animation: clockPulse 2s ease-in-out infinite;
}

.logo::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: shine 4s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes clockPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(0%) translateY(0%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

h1 {
    font-size: 36px;
    margin-bottom: 12px;
    color: #333333;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.subtitle {
    color: #666666;
    margin-bottom: 36px;
    font-size: 17px;
    line-height: 1.4;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.status {
    padding: 20px 24px;
    border-radius: 16px;
    margin-bottom: 32px;
    font-size: 15px;
    font-weight: 500;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.status::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0.3;
}

.status.unbound {
    background: rgba(255, 159, 10, 0.15);
    color: #ff9500;
    border-color: rgba(255, 159, 10, 0.3);
}

.status.bound {
    background: rgba(52, 199, 89, 0.15);
    color: #30d158;
    border-color: rgba(52, 199, 89, 0.3);
}

.status.error {
    background: rgba(255, 69, 58, 0.15);
    color: #ff453a;
    border-color: rgba(255, 69, 58, 0.3);
}

.status:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.user-info {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 32px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.user-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.user-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.user-info h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.user-info p {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 400;
    line-height: 1.4;
}

.button {
    width: 100%;
    padding: 18px 24px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 16px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    backdrop-filter: blur(20px);
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.button:hover::before {
    left: 100%;
}

.button:hover {
    transform: translateY(-3px);
}

.button:active {
    transform: translateY(-1px);
    transition: all 0.1s;
}

.button.primary {
    background: linear-gradient(135deg, rgb(111, 171, 175) 0%, rgb(85, 145, 150) 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(111, 171, 175, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.button.primary:hover {
    background: linear-gradient(135deg, rgb(85, 145, 150) 0%, rgb(70, 125, 130) 100%);
    box-shadow: 0 12px 32px rgba(111, 171, 175, 0.5);
}

.button.secondary {
    background: rgba(111, 171, 175, 0.15);
    backdrop-filter: blur(20px);
    color: rgb(111, 171, 175);
    border: 1px solid rgba(111, 171, 175, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.button.secondary:hover {
    background: rgba(111, 171, 175, 0.25);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.button.danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.button.danger:hover {
    background: linear-gradient(135deg, #ff5252 0%, #d32f2f 100%);
    box-shadow: 0 12px 32px rgba(255, 107, 107, 0.5);
}

.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.loading {
    display: none;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    color: #333333;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(111, 171, 175, 0.2);
    border-top: 3px solid rgb(111, 171, 175);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.footer {
    margin-top: 40px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hidden {
    display: none;
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333333;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.input-field {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(111, 171, 175, 0.3);
    border-radius: 14px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    position: relative;
    color: #333333;
}

.input-field:focus {
    outline: none;
    border-color: rgba(111, 171, 175, 0.6);
    box-shadow: 0 0 0 4px rgba(111, 171, 175, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.input-field::placeholder {
    color: rgba(111, 171, 175, 0.6);
}

.input-field:hover {
    border-color: rgba(111, 171, 175, 0.4);
    background: rgba(255, 255, 255, 0.92);
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
    color: rgba(111, 171, 175, 0.6);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    z-index: 2;
}

.password-toggle:hover {
    color: rgb(85, 145, 150);
    background: rgba(111, 171, 175, 0.1);
}

.password-toggle svg {
    width: 22px;
    height: 22px;
}

.input-field#password {
    padding-right: 50px;
}

@media (max-width: 480px) {
    body {
        padding: 10px;
        min-height: 100vh;
        overflow-x: hidden;
    }
    
    .container {
        padding: 30px 20px 50px 20px;
        margin: 0;
        max-width: 100%;
        width: calc(100vw - 20px);
        min-height: 550px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 15px;
    }
    
    .logo {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    
    .logo::before {
        font-size: 28px;
    }
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.success-animation {
    animation: successPulse 0.6s ease-in-out;
}

.checkmark {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #30d158 0%, #28a745 100%);
    color: white;
    text-align: center;
    line-height: 24px;
    font-size: 14px;
    margin-right: 10px;
    animation: checkmarkAppear 0.6s ease-out;
    box-shadow: 0 4px 12px rgba(48, 209, 88, 0.3);
}

@keyframes checkmarkAppear {
    from {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}
