* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    box-sizing: border-box;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    touch-action: manipulation;
}

body * {
    user-select: none;
}

input,
textarea,
select {
    user-select: auto !important;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    max-width: 200px;
    height: auto;
}

.logo-main {
    max-width: 400px;
    height: auto;
}

.form-container {
    max-width: 500px;
    width: 95%;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 0 10px var(--shadow-color);
    background-color: var(--card-bg);
}

h2 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-color);
}

/* ========================= */
/* MODE TABS                 */
/* ========================= */
.mode-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    background: var(--input-bg);
    border-radius: 30px;
    padding: 5px;
    border: 1px solid var(--input-border);
}

.tab-btn {
    flex: 1;
    padding: 10px 5px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    background: transparent;
    color: var(--text-color);
    opacity: 0.6;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tab-btn.active {
    background: #F75934;
    color: #ffd200;
    opacity: 1;
    box-shadow: 0 3px 10px rgba(247, 89, 52, 0.4);
}

.tab-btn:hover:not(.active) {
    opacity: 0.85;
    background: rgba(247, 89, 52, 0.12);
}

.mode-description {
    text-align: center;
    font-size: 13px;
    color: var(--text-color);
    opacity: 0.75;
    margin: 0 0 16px;
    min-height: 20px;
    transition: opacity 0.2s;
}

/* ========================= */
/* INPUTS                    */
/* ========================= */
input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    border-radius: 25px;
    font-size: 16px;
    box-sizing: border-box;
    color: var(--text-color);
    transition: border 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    border-color: #F75934;
    box-shadow: 0 0 5px rgba(247, 89, 52, 0.4);
    outline: none;
}

label {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
}

.input-group {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-bottom: 10px;
}

/* ========================= */
/* BUTTONS                   */
/* ========================= */
button.small-circle {
    width: 50px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F75934;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s, transform 0.2s;
}

button.small-circle:hover {
    background: #ffd200;
    transform: scale(1.1);
}

button[type="submit"] {
    width: 100%;
    border-radius: 25px;
    padding: 12px;
    font-size: 16px;
    background: #F75934;
    color: #ffd200;
    border: none;
    cursor: pointer;
    margin-top: 15px;
    opacity: 0.5;
    transition: opacity 0.3s, background 0.3s;
}

button[type="submit"]:enabled {
    opacity: 1;
}

/* Search button (recuperar mode) */
#searchBtn {
    width: 100%;
    border-radius: 25px;
    padding: 12px;
    font-size: 16px;
    background: #F75934;
    color: #ffd200;
    border: none;
    cursor: pointer;
    margin-top: 10px;
    transition: opacity 0.3s, background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#searchBtn:hover {
    background: #e04825;
}

/* ========================= */
/* PASSWORD HELP             */
/* ========================= */
#passwordHelpContainer {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 5px;
    padding: 10px;
    margin: 5px 0 15px 0;
    font-size: 16px;
    color: var(--text-color);
}

#passwordHelp {
    font-size: 16px;
    margin: 5px 0;
    text-align: left;
}

#matchText,
#strengthText {
    font-size: 16px;
    margin: 5px 0;
    text-align: center;
}

#confirmWrapper {
    display: none;
}

#strengthBar {
    height: 10px;
    width: 100%;
    background: #e0e0e0;
    border-radius: 5px;
    margin-top: 10px;
}

#strengthFill {
    height: 100%;
    width: 0%;
    border-radius: 5px;
    transition: width 0.3s, background 0.3s;
}

/* ========================= */
/* SPINNER                   */
/* ========================= */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #ffd200;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-left: 5px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========================= */
/* HELPER / RESULT TEXTS     */
/* ========================= */
.helper-text {
    display: block;
    text-align: center;
    color: #ba2626;
    font-size: 0.9em;
    margin-top: 4px;
}

#result {
    text-align: center;
    margin-top: 12px;
    font-size: 15px;
    font-weight: 600;
    min-height: 24px;
}

/* ========================= */
/* RESULT LIST (recuperar)   */
/* ========================= */
#results {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
}

.status-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.status-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #d0d0d0;
}

.status-info {
    border-left: 5px solid #F75934;
}

.status-error {
    border-left: 5px solid #dc3545;
    color: #dc3545;
    font-weight: bold;
    justify-content: center;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 15px;
}

.result-info {
    display: flex;
    gap: 20px;
    align-items: center;
    flex: 1;
    flex-wrap: wrap;
    font-size: 16px;
}

.result-domain {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.result-email {
    color: #777;
}

.action-btn {
    background-color: #F75934;
    color: white !important;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(247, 89, 52, 0.2);
}

.action-btn:hover {
    background-color: #e04825;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(247, 89, 52, 0.3);
}

.success-message {
    color: #28a745;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: #e6fffa;
    border-radius: 15px;
    border: 1px solid #b2f5ea;
}

/* ========================= */
/* FOOTER                    */
/* ========================= */
.footer {
    width: 100%;
    text-align: center;
    padding: 15px 10px;
    color: var(--footer-text);
    font-size: 16px;
    font-weight: 500;
    position: relative;
    margin-top: 30px;
}

/* ========================= */
/* BACK BUTTON               */
/* ========================= */
.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 12px 24px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-family: inherit;
    background: linear-gradient(135deg, #F75934 0%, #FF8E2B 100%);
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(247, 89, 52, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(247, 89, 52, 0.3);
    color: #fff;
}

/* ========================= */
/* PROCESSING OVERLAY        */
/* ========================= */
#processing-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: var(--glass-bg) !important;
    z-index: 2147483647 !important;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    backdrop-filter: blur(10px);
    cursor: wait;
}

#processing-overlay .spinner {
    width: 60px;
    height: 60px;
    border-width: 5px;
    border-color: var(--input-border);
    border-top-color: #F75934;
}

#processing-overlay p {
    margin-top: 25px;
    font-size: 20px;
    color: var(--text-color);
    font-weight: 700;
}

/* ========================= */
/* RESPONSIVE                */
/* ========================= */
@media (max-width: 600px) {
    body {
        padding-left: 5px;
        padding-right: 5px;
        padding-top: 20px;
    }

    .logo {
        max-width: 120px;
    }

    .logo-main {
        max-width: 220px;
    }

    .form-container {
        padding: 15px;
        border-radius: 10px;
        box-shadow: none;
    }

    h2 {
        font-size: 18px;
    }

    .tab-btn {
        font-size: 12px;
        padding: 9px 4px;
        gap: 4px;
    }

    input[type="text"],
    input[type="password"],
    input[type="email"] {
        font-size: 16px;
        padding: 8px;
    }

    button.small-circle {
        width: 40px;
        height: 35px;
        font-size: 16px;
    }

    button[type="submit"],
    #searchBtn {
        padding: 10px;
        font-size: 16px;
    }

    #passwordHelpContainer {
        font-size: 12px;
        padding: 8px;
    }

    #passwordHelp,
    #matchText,
    #strengthText {
        font-size: 12px;
    }

    .result-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .status-item {
        padding: 12px 15px;
    }

    .footer {
        font-size: 9px;
        padding: 8px 5px;
        margin-top: 15px;
    }
}