/* Reset e Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --orange-primary: #FF6A00;
    --orange-light: #FF8C42;
    --orange-dark: #E55A00;
    --orange-lighter: #FFB380;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --red-50: #fef2f2;
    --red-200: #fecaca;
    --red-700: #b91c1c;
    --green-50: #f0fdf4;
    --green-200: #bbf7d0;
    --green-800: #166534;
    --blue-50: #eff6ff;
    --blue-200: #bfdbfe;
    --blue-800: #1e40af;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(to bottom right, #fff5f0, #ffffff);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
}

/* Container Principal */
.main-container {
    min-height: 100vh;
    padding: 2rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 42rem;
    width: 100%;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.title-highlight {
    color: var(--orange-primary);
}

.subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
}

/* Card */
.card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
}

.tab-button {
    flex: 1;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    background: transparent;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-button:hover {
    background: var(--gray-50);
}

.tab-button.active {
    background: var(--orange-primary);
    color: white;
}

.tab-content {
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .tab-content {
        padding: 2rem;
    }
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Form */
.form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--orange-primary);
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.1);
}

.form-input-code {
    text-align: center;
    font-size: 1.5rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.25rem;
    font-weight: 600;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--gray-600);
    text-align: center;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 1rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--gray-700);
}

.radio-input {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: var(--orange-primary);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--orange-primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--orange-dark);
    transform: scale(1.02);
}

.btn-primary:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-800);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-300);
}

.btn-copy {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.alert-error {
    background: var(--red-50);
    border: 1px solid var(--red-200);
    color: var(--red-700);
}

.alert-success {
    background: var(--green-50);
    border: 1px solid var(--green-200);
    color: var(--green-800);
}

.alert-info {
    background: var(--blue-50);
    border: 1px solid var(--blue-200);
    color: var(--blue-800);
    font-size: 0.875rem;
}

/* Result Container */
.result-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.code-display {
    background: linear-gradient(to right, var(--orange-primary), var(--orange-light));
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
}

.code-label {
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.code-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.code-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.25rem;
    font-family: 'Courier New', monospace;
}

@media (min-width: 768px) {
    .code-text {
        font-size: 3rem;
    }
}

.url-info {
    background: var(--gray-50);
    border-radius: 0.5rem;
    padding: 1rem;
}

.url-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.url-text {
    color: var(--gray-900);
    font-weight: 500;
    word-break: break-all;
}

.hits-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.hits-value {
    font-weight: 600;
    color: var(--orange-primary);
}

/* Confirm Page */
.confirm-page {
    padding: 1rem;
}

.confirm-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    max-width: 28rem;
    width: 100%;
}

@media (min-width: 768px) {
    .confirm-card {
        padding: 2rem;
    }
}

.confirm-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.confirm-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.confirm-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.confirm-subtitle {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.confirm-url-box {
    background: var(--gray-50);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.confirm-url-text {
    color: var(--gray-900);
    font-weight: 500;
    word-break: break-all;
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .confirm-url-text {
        font-size: 1rem;
    }
}

.confirm-actions {
    display: flex;
    gap: 0.75rem;
}

.confirm-actions .btn {
    flex: 1;
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

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

/* Responsive */
@media (max-width: 640px) {
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .code-text {
        font-size: 2rem;
    }
    
    .code-wrapper {
        flex-direction: column;
    }
}
