/* Reset y base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.status-indicator.active {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.status-indicator.inactive {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.status-indicator.pending {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    margin: 5px;
}

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

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #545b62;
    transform: translateY(-1px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #c82333;
    transform: translateY(-1px);
}

/* Textarea */
textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    resize: vertical;
    background: #f8f9fa;
}

textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: white;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .btn {
        width: 100%;
        margin: 5px 0;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 152, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 152, 0, 0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Estados específicos */
.connected {
    background: #d4edda !important;
    border-color: #c3e6cb !important;
    color: #155724 !important;
}

.disconnected {
    background: #f8d7da !important;
    border-color: #f5c6cb !important;
    color: #721c24 !important;
}

.pending {
    background: #fff3cd !important;
    border-color: #ffeaa7 !important;
    color: #856404 !important;
}

/* Instruction boxes */
.instruction-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
}

.instruction-box h3 {
    color: #495057;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.instruction-box p {
    color: #6c757d;
    margin-bottom: 10px;
    line-height: 1.6;
}

.instruction-box ol, .instruction-box ul {
    color: #6c757d;
    margin-left: 20px;
    line-height: 1.6;
}

.instruction-box li {
    margin-bottom: 8px;
}

.instruction-box strong {
    color: #495057;
}

/* iOS-specific instruction box */
.ios-warning {
    border-left: 4px solid #ff9800 !important;
    background: #fff3e0 !important;
}

.ios-warning h3 {
    color: #e65100 !important;
}

.ios-warning h4 {
    color: #f57c00;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.ios-warning p, .ios-warning li {
    color: #bf360c !important;
}

.ios-warning strong {
    color: #d84315 !important;
}

/* Form elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #495057;
    font-weight: 500;
    font-size: 0.95rem;
}

.input-field {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: white;
    margin-bottom: 10px;
}

.input-field:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.input-field::placeholder {
    color: #adb5bd;
}

/* Small buttons */
.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 6px;
}

/* Button group */
.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Copy button specific styling */
#copy-subscription {
    margin-top: 10px;
    display: block;
    width: auto;
}

/* Responsive adjustments for new elements */
@media (max-width: 768px) {
    .instruction-box {
        padding: 15px;
    }
    
    .instruction-box h3 {
        font-size: 1rem;
    }
    
    .instruction-box ol, .instruction-box ul {
        margin-left: 15px;
        font-size: 0.9rem;
    }
    
    .button-group {
        flex-direction: column;
        gap: 5px;
    }
    
    .btn-small {
        width: 100%;
        margin: 5px 0;
    }
    
    #copy-subscription {
        width: 100%;
    }
} 