/* Common Styles for Metrike Front-End */
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root Variables */
:root {
    --color-bg-primary: #0a0a0a;
    --color-bg-secondary: #1a1a1a;
    --color-text-primary: #ffffff;
    --color-text-secondary: rgba(255, 255, 255, 0.7);
    --color-accent-cyan: #00ffff;
    --color-accent-orange: #ff6600;
    --color-border: rgba(255, 255, 255, 0.1);
    --color-border-cyan: rgba(0, 255, 255, 0.2);
    --color-border-cyan-hover: rgba(0, 255, 255, 0.4);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow-cyan: 0 0 20px rgba(0, 255, 255, 0.3);
    --shadow-glow-orange: 0 0 20px rgba(255, 102, 0, 0.3);
    --border-radius-sm: 12px;
    --border-radius-md: 20px;
    --border-radius-lg: 24px;
    --border-radius-pill: 50px;
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 50%, var(--color-bg-primary) 100%);
    background-attachment: fixed;
    color: var(--color-text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 102, 0, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Common Container Styles */
.container,
.login-container {
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    box-shadow: 
        var(--shadow-lg),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
}

/* Logo Styles */
.logo,
.dashboard-logo {
    max-width: 200px;
    width: auto;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 255, 255, 0.2));
}

.logo-container {
    margin-bottom: 2.5rem;
    text-align: center;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 300;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
}

h1 {
    font-size: 2.75rem;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle,
.code-message {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    font-weight: 300;
    line-height: 1.8;
}

/* Common Input Styles */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-border-cyan);
    border-radius: var(--border-radius-pill);
    color: var(--color-text-primary);
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: var(--transition-base);
    box-shadow: 
        var(--shadow-sm),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-border-cyan-hover);
    box-shadow: 
        var(--shadow-glow-cyan),
        var(--shadow-md),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.5);
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

textarea {
    border-radius: var(--border-radius-md);
    padding: 15px 20px;
    min-height: 120px;
    resize: vertical;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300FFFF' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

/* Common Button Styles */
button,
.btn,
.link {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    padding: 0.875rem 2rem;
    border-radius: var(--border-radius-pill);
    transition: var(--transition-base);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    border: 1px solid;
    position: relative;
    overflow: hidden;
}

/* Primary Button (Cyan) */
.btn-primary,
.submit-button,
.send-button {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 255, 255, 0.15) 100%);
    backdrop-filter: blur(10px);
    color: var(--color-accent-cyan);
    border-color: var(--color-border-cyan);
    box-shadow: 
        0 4px 12px rgba(0, 255, 255, 0.2),
        0 0 20px rgba(0, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary:hover,
.submit-button:hover,
.send-button:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3) 0%, rgba(0, 255, 255, 0.2) 100%);
    border-color: var(--color-border-cyan-hover);
    box-shadow: 
        0 6px 20px rgba(0, 255, 255, 0.3),
        0 0 30px rgba(0, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Secondary Button (Orange) */
.btn-secondary,
.cancel-button,
.upgrade-button {
    background: transparent;
    color: var(--color-accent-orange);
    border-color: rgba(255, 102, 0, 0.3);
    box-shadow: 
        var(--shadow-sm),
        0 0 12px rgba(255, 102, 0, 0.1);
}

.btn-secondary:hover,
.cancel-button:hover,
.upgrade-button:hover {
    background: rgba(255, 102, 0, 0.1);
    border-color: rgba(255, 102, 0, 0.5);
    box-shadow: 
        0 4px 16px rgba(255, 102, 0, 0.3),
        0 0 20px rgba(255, 102, 0, 0.2);
    transform: translateY(-1px);
}

/* Outline Button */
.btn-outline,
.signup-button,
.link {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    color: var(--color-text-primary);
    border-color: var(--color-border);
}

.btn-outline::before,
.link::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.5s;
}

.btn-outline:hover::before,
.link:hover::before {
    left: 100%;
}

.btn-outline:hover,
.signup-button:hover,
.link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 
        var(--shadow-md),
        0 0 20px rgba(255, 255, 255, 0.1);
}

/* Link Primary Variant */
.link-primary {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 255, 255, 0.1) 100%);
    border-color: var(--color-border-cyan);
    color: var(--color-accent-cyan);
    box-shadow: 
        0 0 15px rgba(0, 255, 255, 0.2),
        inset 0 0 15px rgba(0, 255, 255, 0.05);
}

.link-primary:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3) 0%, rgba(0, 255, 255, 0.2) 100%);
    border-color: var(--color-border-cyan-hover);
    box-shadow: 
        0 4px 20px rgba(0, 255, 255, 0.3),
        0 0 30px rgba(0, 255, 255, 0.2),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
}

/* Disabled Button State */
button:disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Form Group */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    color: var(--color-accent-cyan);
    margin-bottom: 0.5rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Loading Animation */
.loading {
    position: relative;
}

.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 currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .subtitle,
    .code-message {
        font-size: 1rem;
    }

    .container,
    .login-container {
        padding: 2rem 1.5rem;
        border-radius: var(--border-radius-md);
    }

    button,
    .btn,
    .link {
        width: 100%;
        padding: 0.875rem 1.5rem;
    }
}

@media (max-width: 640px) {
    body {
        padding: 1rem;
    }

    .logo,
    .dashboard-logo {
        max-width: 150px;
    }
}
