@import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=IBM+Plex+Sans:wght@400;600;700&family=IBM+Plex+Mono:wght@400;600&display=swap');

:root {
    --bg-dark: #f2f3f5;
    --bg-card: #ffffff;
    --bg-input: #f7f8f9;
    --accent: #c8102e;
    --accent-hover: #a50d26;
    --accent-glow: rgba(200, 16, 46, 0.22);
    --on-accent: #ffffff;
    --emphasis: #1a1a1a;
    --surface-teal: #e4e6e9;
    --surface-teal-hover: #d5d8dc;
    --text-primary: #1f2328;
    --text-secondary: #656d76;
    --border: #d8dbdf;
    --heading: #0b0b0c;
    --tint: rgba(0, 0, 0, 0.025);
    --tint-hover: rgba(0, 0, 0, 0.05);
    --overlay: rgba(12, 12, 14, 0.55);
    --shadow: rgba(0, 0, 0, 0.1);
}

a {
    color: var(--emphasis);
}

a:hover {
    color: var(--accent);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'IBM Plex Sans', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* form controls don't inherit font-family by default */
button,
input,
select,
textarea {
    font-family: inherit;
}

.futuristic-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
}

.futuristic-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 8px 32px var(--shadow);
    position: relative;
    overflow: hidden;
}

.futuristic-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

h1,
h2,
h3 {
    color: var(--heading);
    font-family: 'Special Elite', system-ui;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="datetime-local"],
textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    color: var(--text-primary);
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
    animation: glow-pulse 2s infinite ease-in-out;
}

@keyframes glow-pulse {
    0% { box-shadow: 0 0 5px var(--accent-glow); border-color: var(--accent-glow); }
    50% { box-shadow: 0 0 20px var(--accent-glow); border-color: var(--accent); }
    100% { box-shadow: 0 0 5px var(--accent-glow); border-color: var(--accent-glow); }
}

.btn-secondary {
    background: var(--accent);
    color: var(--on-accent);
    border: none;
    border-radius: 999px;
    padding: 12px 24px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    width: 100%;
    transition: transform 0.2s, background 0.3s;
}

.btn-secondary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

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

.btn-primary {
    background: var(--surface-teal);
    color: var(--text-primary);
    border: none;
    border-radius: 999px;
    padding: 12px 24px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    width: 100%;
    transition: transform 0.2s, background 0.3s;
}

.btn-primary:hover {
    background: var(--surface-teal-hover);
    transform: translateY(-2px);
}

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

.link-box {
    background: var(--bg-input);
    border: 1px dashed var(--border);
    padding: 15px;
    border-radius: 12px;
    margin-top: 20px;
    word-break: break-all;
    font-family: 'IBM Plex Mono', monospace;
    color: var(--emphasis);
}

.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-online {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

/* Custom Switch/Radio styles can be added here */

.secret-textbox {
    background-color: var(--bg-input) !important;
    color: var(--text-primary) !important;
    font-family: 'Special Elite', cursive !important;
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
    font-size: 1.1rem;
    line-height: 1.5;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-icon {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-icon:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
    transform: rotate(90deg);
}

.btn-eye {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-eye:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.btn-danger {
    background: #ff4d4d;
    color: white;
    border: none;
    border-radius: 999px;
    padding: 12px 24px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    width: 100%;
    transition: transform 0.2s, background 0.3s;
}

.btn-danger:hover {
    background: #e60000;
    transform: translateY(-2px);
}

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

.svg-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.icon-eye-on {
    -webkit-mask-image: url('../images/eye-on.svg');
    mask-image: url('../images/eye-on.svg');
}

.icon-eye-off {
    -webkit-mask-image: url('../images/eye-off.svg');
    mask-image: url('../images/eye-off.svg');
}

.icon-refresh {
    -webkit-mask-image: url('../images/generate-password.svg');
    mask-image: url('../images/generate-password.svg');
}

/* Micro-Animations */

.scanning-effect {
    position: relative;
    overflow: hidden;
    animation: decrypt-flicker 1.5s ease-out forwards;
}

.scanning-effect::after {
    content: "";
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--accent-glow) 50%,
        var(--accent) 50%,
        var(--accent-glow) 51%,
        transparent
    );
    animation: scan-move 1.5s linear forwards;
    pointer-events: none;
}

@keyframes scan-move {
    0% { top: -100%; }
    100% { top: 100%; }
}

@keyframes decrypt-flicker {
    0% { filter: blur(10px); opacity: 0; }
    20% { filter: blur(5px); opacity: 0.5; }
    40% { filter: blur(8px); opacity: 0.3; }
    60% { filter: blur(2px); opacity: 0.8; }
    80% { filter: blur(4px); opacity: 0.6; }
    100% { filter: blur(0); opacity: 1; }
}

.unlock-animation {
    animation: unlock-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes unlock-pop {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.confetti-container {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 1px;
    pointer-events: none;
    z-index: 100;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--accent);
    opacity: 0;
    border-radius: 2px;
    animation: confetti-fall 2s ease-out forwards;
}

@keyframes confetti-fall {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
    25% { transform: translate(var(--x1), var(--y1)) rotate(90deg); }
    50% { transform: translate(var(--x2), var(--y2)) rotate(180deg); }
    75% { transform: translate(var(--x3), var(--y3)) rotate(270deg); }
    100% { transform: translate(var(--x4), var(--y4)) rotate(360deg); opacity: 0; }
}

/* Modal and Info Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.info-modal {
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    position: relative;
    box-shadow: 0 8px 32px var(--shadow);
    font-family: 'Special Elite', system-ui;
}

.info-modal h2 {
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
    margin-top: 0;
}

.info-section {
    margin-bottom: 20px;
}

.info-section strong {
    color: var(--emphasis);
    display: block;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.info-section p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.6;
}

.info-content p {
    line-height: 1.6;
    margin-bottom: 15px;
}

.btn-close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.btn-close-modal:hover {
    color: #ff4d4d;
}

.security-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
    cursor: pointer;
    display: inline-block;
    margin-top: 10px;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.form-col {
    flex: 1;
    min-width: 250px;
}

.disabled-field {
    opacity: 0.3;
    pointer-events: none;
}

@media (max-width: 600px) {
    .form-col {
        min-width: 100%;
    }
}

.security-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.expandable-header {
    background: var(--tint);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    user-select: none;
}

.expandable-header:hover {
    background: var(--tint-hover);
    border-color: var(--accent);
}

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

.expandable-header .toggle-icon {
    transition: transform 0.3s ease;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.expandable-header.expanded .toggle-icon {
    transform: rotate(180deg);
}

.expandable-content {
    padding: 10px 5px;
    margin-bottom: 20px;
    border-left: 2px solid var(--border);
    padding-left: 20px;
    margin-left: 5px;
    animation: fadeIn 0.3s ease-out;
}
