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

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

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 16px;
}

/* Main Content */
.main-content {
    padding: 40px 0;
}

/* Card */
.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #666;
}

/* Turnstile Container */
.turnstile-container {
    margin: 25px 0;
}

.turnstile-container label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.turnstile-widget {
    display: flex;
    justify-content: center;
    min-height: 65px;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary:hover {
    background: #5a6268;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.button-group .btn {
    flex: 1;
}

/* Monitoring Status */
.status-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.status-item:last-child {
    border-bottom: none;
}

.status-item .label {
    font-weight: 600;
    color: #666;
}

.status-item .value {
    color: #333;
    font-weight: 500;
}

.status-active {
    color: #28a745 !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Pulse Animation */
.pulse-dot {
    width: 10px;
    height: 10px;
    background: #28a745;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 1s linear;
    width: 0%;
}

/* Code Display */
.code-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
}

.code-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-bottom: 15px;
}

.code-value {
    font-size: 48px;
    font-weight: bold;
    color: white;
    font-family: 'Courier New', monospace;
    letter-spacing: 8px;
}

/* Result Info */
.result-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    font-weight: 600;
    color: #666;
}

.info-item .value {
    color: #333;
}

/* Error Card */
.error-card {
    border: 2px solid #dc3545;
}

.error-card h2 {
    color: #dc3545;
}

.error-card p {
    color: #666;
    text-align: center;
    margin: 20px 0;
    font-size: 16px;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 0;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    border-left: 4px solid #28a745;
}

.toast.error {
    border-left: 4px solid #dc3545;
}

.toast.info {
    border-left: 4px solid #17a2b8;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 24px;
    }
    
    .card {
        padding: 20px;
    }
    
    .code-value {
        font-size: 36px;
        letter-spacing: 4px;
    }
}

