* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #0c0c0e; 
    color: #ffffff;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.container {
    width: 100%;
    max-width: 360px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 2;
}

.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

h1 {
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.5px;
    margin-bottom: 32px;
    text-align: center;
    color: #f4f4f5;
}

.form-group {
    width: 100%;
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 13px;
    color: #a1a1aa; 
    margin-bottom: 8px;
    padding-left: 2px;
}

.text-input {
    width: 100%;
    background: #131316; 
    border: 1px solid #27272a; 
    border-radius: 8px;
    padding: 12px 16px;
    color: #e4e4e7;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.text-input:focus {
    border-color: #52525b; 
    background-color: #18181b;
}

input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}
input[type=number] { -moz-appearance: textfield; }

.input-error {
    border-color: #ef4444 !important;
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.brutal-block {
    background-color: #131316;
    border: 1px solid #27272a;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 24px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: margin-bottom 0.3s;
}

#brutal-check:checked + .checkbox-row {
    margin-bottom: 14px;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    background-color: #0c0c0e;
    border: 1px solid #3f3f46;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

#brutal-check { display: none; }

#brutal-check:checked + .checkbox-row .checkbox-custom {
    background-color: #22c55e;
    border-color: #22c55e;
}

#brutal-check:checked + .checkbox-row .checkbox-custom svg {
    opacity: 1;
    stroke: #000;
}

.checkbox-custom svg {
    opacity: 0;
    transition: opacity 0.2s;
}

.checkbox-text { display: flex; flex-direction: column; }
.checkbox-title { font-size: 14px; font-weight: 500; color: #e4e4e7; }
.checkbox-subtitle { font-size: 11px; color: #71717a; margin-top: 2px; }

.speed-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

#brutal-check:checked ~ .speed-inputs { opacity: 1; }

.speed-group label { font-size: 11px; color: #a1a1aa; margin-bottom: 4px; }
.speed-group .text-input { padding: 8px 12px; font-size: 14px; }
.speed-note { grid-column: 1 / -1; font-size: 11px; color: #52525b; margin-top: 6px; }

.main-btn {
    width: 100%;
    background-color: #18181b; 
    color: #e4e4e7;
    border: 1px solid #27272a;
    border-radius: 8px;
    padding: 12px 28px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.main-btn:hover { background-color: #27272a; border-color: #3f3f46; }
.main-btn:active { transform: scale(0.98); }

.footer-note {
    margin-top: 40px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #52525b;
    text-align: center;
    line-height: 1.6;
    text-transform: uppercase;
    max-width: 380px;
    align-self: center;
}

.result-view {
    width: 100%;
    max-width: 420px;
    display: none;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.4s ease;
    z-index: 2;
}
.result-view.active { display: flex; }

.success-icon { width: 48px; height: 48px; color: #22c55e; margin-bottom: 24px; }
.result-box {
    width: 100%;
    background: #131316;
    border: 1px solid #27272a;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}
.result-label { font-size: 14px; color: #a1a1aa; margin-bottom: 12px; text-align: left; }

.link-row {
    display: flex;
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}
.link-display {
    width: 100%;
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 12px 44px 12px 16px; 
    font-family: monospace;
    font-size: 13px;
    outline: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.copy-icon-btn {
    position: absolute; right: 0; top: 0; bottom: 0; width: 40px;
    background: transparent; border: none; border-left: 1px solid #27272a;
    color: #a1a1aa; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
}
.copy-icon-btn:hover { background-color: #18181b; color: #fff; }

.download-btn {
    background-color: #e4e4e7; color: #000; border: none; border-radius: 8px;
    padding: 12px; width: 100%; font-weight: 600; cursor: pointer; transition: 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.download-btn:hover { background-color: #fff; }

.back-link {
    margin-top: 16px; color: #71717a; font-size: 13px; cursor: pointer;
    text-decoration: none; transition: 0.2s; display: inline-block;
}
.back-link:hover { color: #e4e4e7; }

@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
