* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    user-select: none;
}

:root {
    --primary: #FF0000;
    --primary-dark: #CC0000;
    --primary-light: #FF3333;
    --primary-bg: #fff5f5;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 0, 0, 0.1);
    --glass-shadow: rgba(255, 0, 0, 0.15);
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --border-radius: 12px;
}

body {
    background: linear-gradient(135deg, var(--primary-bg) 0%, #ffffff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    padding-top: 20px;
    overflow-y: auto;
}

@media screen and (max-width: 480px) {
    body {
        padding: 10px;
        padding-top: 80px;
        align-items: flex-start;
    }

    .login-container {
        padding: 1.5rem;
        margin: 0;
        border-radius: 16px;
    }

    .login-header h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .login-header p {
        font-size: 0.9rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

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

    .form-group input {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .login-button,
    .website-button {
        padding: 0.875rem;
        font-size: 0.9rem;
        letter-spacing: 1px;
    }

    .logo {
        width: 48px;
        height: 48px;
        margin-bottom: 1rem;
    }

    .logo::before {
        font-size: 1.5rem;
    }

    .website-url {
        font-size: 0.8rem;
        margin-top: 1rem;
    }

    .error-message {
        font-size: 0.8rem;
        padding: 0.5rem;
        margin-top: 0.75rem;
    }

    .loading {
        font-size: 0.8rem;
        bottom: 1.5rem;
    }

    .top-bar {
        height: 60px;
    }

    .header-logo {
        height: 40px;
    }
}

@media screen and (max-width: 360px) {
    body {
        padding: 5px;
        padding-top: 70px;
    }

    .login-container {
        padding: 1rem;
    }

    .login-header h1 {
        font-size: 1.25rem;
    }

    .form-group input {
        padding: 0.625rem 0.875rem;
    }

    .login-button,
    .website-button {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
}

.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
}

.login-container {
    background: var(--glass-bg);
    padding: 4rem;
    padding-bottom: 5.5rem;
    border-radius: 24px;
    width: 100%;
    max-width: 580px;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    border: 2px solid var(--primary);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.2),
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px var(--primary);
}

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

.login-header h1 {
    color: var(--text-dark);
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.login-header p {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 500;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--text-dark);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: white;
    border: 2px solid var(--text-dark);
    border-radius: 12px;
    font-size: 1.1rem;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--glass-shadow);
    background-color: white;
}

.form-group input.error {
    border-color: var(--primary);
    background-color: rgba(255, 51, 51, 0.05);
}

.form-group .error-message {
    color: var(--primary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
    font-weight: 500;
}

.login-button, .website-button {
    background: linear-gradient(90deg, 
        #ff0000 0%,
        var(--primary-dark) 50%,
        #ff0000 100%
    );
    background-size: 200% 100%;
    animation: gradientAnimation 2s ease-in-out infinite;
    color: #ffffff;
    padding: 1.25rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    width: 100%;
    margin: 0 auto;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 10px 20px rgba(255, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.login-button {
    margin-bottom: 1rem;
}

.login-button::before, .website-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transition: left 0.8s ease;
    z-index: -1;
}

.login-button::after, .website-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-dark), var(--primary));
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: -1;
}

.login-button:hover, .website-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(255, 0, 0, 0.4);
    animation: gradientAnimation 1s ease-in-out infinite;
    background-size: 200% 100%;
}

.login-button:hover::before, .website-button:hover::before {
    left: 100%;
}

.login-button:hover::after, .website-button:hover::after {
    opacity: 1;
}

.login-button:active, .website-button:active {
    transform: translateY(1px);
    box-shadow: 0 10px 20px rgba(255, 0, 0, 0.3);
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 0%;
    }
    100% {
        background-position: 0% 0%;
    }
}

.logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    background: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 8px 16px var(--glass-shadow);
}

.logo::before {
    content: '\f023';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: black;
    font-size: 1.75rem;
}

.logo:hover {
    background: var(--primary);
}

.website-url {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.9;
    user-select: text;
}

.error-message {
    color: var(--primary);
    text-align: center;
    margin-top: 1rem;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.75rem;
    background-color: rgba(255, 51, 51, 0.1);
    border-radius: 8px;
    border: 1px solid var(--primary);
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.brute-force-error {
    margin-top: 0.5rem;
    background-color: rgba(255, 51, 51, 0.2);
    border-width: 2px;
}

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

.loading {
    display: none;
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    margin: 0 auto;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--primary);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.4);
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.logo-container {
    height: 100%;
    padding: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
    animation-delay: 0.3s;
}

.header-logo {
    height: 100px;
    width: auto;
    margin-left: -10px;
    margin-top: 5px;
}

.email-error {
    color: var(--primary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
    font-weight: 500;
}

/* Yubikey-input tyylit */
.yubikey-input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.yubikey-input:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.2);
}

.yubikey-input.valid {
    border-color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.1);
}

.yubikey-input.invalid {
    border-color: #f44336;
    background-color: rgba(244, 67, 54, 0.1);
}

/* Yubikey-rekisteröinti tyylit */
.yubikey-registration-prompt {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.yubikey-registration-prompt h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.yubikey-registration-prompt p {
    color: #6c757d;
    margin-bottom: 20px;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.button-group button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.register-yes {
    background-color: #28a745;
    color: white;
}

.register-yes:hover {
    background-color: #218838;
}

.register-no {
    background-color: #6c757d;
    color: white;
}

.register-no:hover {
    background-color: #5a6268;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
} 