/* =============================================================================
   Royal TV - Prova Gratuita IPTV
   Stile principale
   ============================================================================= */

/* CSS Variables */
:root {
    --primary-color: #d4af37;
    --primary-dark: #b8962e;
    --primary-light: #f0d875;
    --secondary-color: #1a1a2e;
    --accent-color: #16213e;
    --success-color: #00c853;
    --error-color: #ff5252;
    --warning-color: #ffc107;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #6c6c6c;
    --bg-dark: #0a0a12;
    --bg-card: rgba(26, 26, 46, 0.95);
    --bg-input: rgba(255, 255, 255, 0.05);
    --border-color: rgba(212, 175, 55, 0.3);
    --shadow-gold: 0 0 30px rgba(212, 175, 55, 0.2);
    --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Animation */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(22, 33, 62, 0.8) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(26, 26, 46, 0.9) 0%, var(--bg-dark) 70%);
    animation: gradientShift 15s ease infinite;
}

.bg-gradient-success {
    background: 
        radial-gradient(ellipse at 50% 30%, rgba(0, 200, 83, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(26, 26, 46, 0.9) 0%, var(--bg-dark) 70%);
}

.bg-gradient-error {
    background: 
        radial-gradient(ellipse at 50% 30%, rgba(255, 82, 82, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(26, 26, 46, 0.9) 0%, var(--bg-dark) 70%);
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.bg-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, var(--primary-color), transparent),
        radial-gradient(2px 2px at 40px 70px, var(--primary-light), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(2px 2px at 130px 80px, var(--primary-color), transparent),
        radial-gradient(1px 1px at 160px 120px, #fff, transparent);
    background-size: 200px 200px;
    animation: particleFloat 20s linear infinite;
    opacity: 0.5;
}

@keyframes particleFloat {
    from { transform: translateY(0); }
    to { transform: translateY(-200px); }
}

/* Container */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    padding: 40px 0 30px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.logo-icon {
    font-size: 48px;
    animation: crownBounce 2s ease infinite;
}

@keyframes crownBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.logo-text {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Notice Box */
.notice-box {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 25px;
}

.notice-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.notice-content strong {
    display: block;
    color: var(--warning-color);
    margin-bottom: 4px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.notice-content p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

/* Main Card */
.main-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    flex: 1;
}

.main-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light), var(--primary-color));
}

/* Steps Section */
.steps-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.steps-section h3 {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.step:hover {
    background: rgba(212, 175, 55, 0.1);
}

.step-number {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.step-text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Form Styles */
.trial-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 500;
    color: var(--text-primary);
}

.label-icon {
    font-size: 22px;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 18px;
    font-family: inherit;
    transition: var(--transition-fast);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(212, 175, 55, 0.05);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: var(--error-color);
}

.input-hint {
    font-size: 14px;
    color: var(--text-muted);
}

/* CAPTCHA Section */
.captcha-section {
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 10px;
}

.captcha-box {
    margin-bottom: 15px;
}

.captcha-image-container {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 10px;
}

.captcha-image-container img {
    max-width: 200px;
    height: auto;
    border-radius: 4px;
}

.btn-refresh {
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 20px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-refresh:hover {
    background: var(--primary-dark);
    transform: rotate(180deg);
}

/* Form Actions */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-medium);
    text-decoration: none;
}

.btn-icon {
    font-size: 24px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--secondary-color);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: rgba(212, 175, 55, 0.1);
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 18, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 100;
    border-radius: var(--radius-lg);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-input);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Message Box */
.message-box {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-size: 15px;
    text-align: center;
}

.message-box.success {
    background: rgba(0, 200, 83, 0.15);
    border: 1px solid rgba(0, 200, 83, 0.3);
    color: var(--success-color);
}

.message-box.error {
    background: rgba(255, 82, 82, 0.15);
    border: 1px solid rgba(255, 82, 82, 0.3);
    color: var(--error-color);
}

/* Result Pages */
.result-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    margin-top: 40px;
}

.result-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 50px;
}

.success-icon {
    background: rgba(0, 200, 83, 0.15);
    animation: successPulse 2s ease infinite;
}

@keyframes successPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.3); }
    50% { box-shadow: 0 0 0 20px rgba(0, 200, 83, 0); }
}

.error-icon {
    background: rgba(255, 82, 82, 0.15);
}

.result-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.success-card .result-title {
    color: var(--success-color);
}

.error-card .result-title {
    color: var(--error-color);
}

.result-message {
    margin-bottom: 30px;
}

.main-message {
    font-size: 18px;
    color: var(--text-primary);
    line-height: 1.6;
}

.error-message p {
    color: var(--text-secondary);
}

/* Instructions Box */
.instructions-box {
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 25px;
    text-align: left;
    margin-bottom: 25px;
}

.instructions-box h3 {
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.instructions-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.instructions-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    color: var(--text-secondary);
}

.instruction-icon {
    flex-shrink: 0;
}

/* Timer Box */
.timer-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 25px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.timer-icon {
    font-size: 24px;
}

.timer-text {
    font-size: 16px;
    color: var(--text-secondary);
}

.timer-text strong {
    color: var(--primary-color);
}

/* Help Box */
.help-box {
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 25px;
    text-align: left;
    margin-bottom: 25px;
}

.help-box h3 {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.help-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.help-list li {
    position: relative;
    padding-left: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.help-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

/* Contact Box */
.contact-box {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-box p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0 20px;
    margin-top: auto;
}

.footer p {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-support {
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 30px 0 20px;
    }
    
    .logo-icon {
        font-size: 40px;
    }
    
    .logo-text {
        font-size: 28px;
    }
    
    .title {
        font-size: 20px;
    }
    
    .main-card {
        padding: 25px 20px;
    }
    
    .result-card {
        padding: 30px 20px;
    }
    
    .captcha-image-container {
        flex-direction: column;
    }
    
    .captcha-image-container img {
        max-width: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.main-card, .result-card {
    animation: fadeIn 0.5s ease;
}
