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

:root {
    --primary-color: #2fc7f7;
    --primary-dark: #1ea6d1;
    --secondary-color: #525c69;
    --success-color: #63c962;
    --warning-color: #ffa726;
    --error-color: #f55753;
    --background-color: #f0f4f7;
    --surface-color: #ffffff;
    --text-primary: #333333;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 24px 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow-md);
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 400;
    margin-left: auto;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content-grid {
    display: grid;
    gap: 24px;
    flex: 1;
}

/* Panel Styles */
.panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease-out;
}

.panel-header {
    margin-bottom: 32px;
    text-align: center;
}

.panel-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
}

.panel-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
}

/* Manual Panel Styles */
.manual-content {
    color: var(--text-primary);
}

.manual-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.manual-item {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: var(--transition);
}

.manual-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.manual-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.manual-text {
    flex: 1;
}

.manual-text h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.manual-text p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
}

.manual-text p strong {
    color: var(--text-primary);
}

.manual-text p:last-child {
    margin-bottom: 0;
}

.manual-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step {
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary-color);
    color: rgba(255, 255, 255, 0.9);
    position: relative;
}

.step::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.manual-steps {
    counter-reset: step-counter;
}

/* Status Bar */
.status-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface-color);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 1000;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.status-bar.show {
    opacity: 1;
    pointer-events: auto;
}

.status-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    font-weight: 600;
}

.status-bar.success .status-icon {
    background: var(--success-color);
}

.status-bar.error .status-icon {
    background: var(--error-color);
}

.status-bar.info .status-icon {
    background: var(--primary-color);
}

.status-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Light overrides for content inside tab panels (white background) */
.tab-content .panel {
    background: #ffffff;
    border: 1px solid var(--border-color);
    backdrop-filter: none;
}

.tab-content .panel-header h2 {
    color: var(--text-primary);
    text-shadow: none;
}

.tab-content .panel-subtitle {
    color: var(--text-secondary);
}

.tab-content .manual-content {
    color: var(--text-primary);
}

.tab-content .manual-item {
    background: #fafafa;
    border: 1px solid var(--border-color);
}

.tab-content .manual-item:hover {
    background: #f5f5f5;
}

.tab-content .manual-text h3 {
    color: var(--text-primary);
}

.tab-content .manual-text p {
    color: var(--text-secondary);
}

.tab-content .manual-text p strong {
    color: var(--text-primary);
}

.tab-content .step {
    background: #f9fafb;
    border-left-color: var(--primary-color);
    color: var(--text-secondary);
}

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

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

/* Loading states */
.loading {
    animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .header {
        padding: 20px 24px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .header-subtitle {
        margin-left: 0;
    }
    
    .panel {
        padding: 24px 20px;
    }
    
    .manual-item {
        flex-direction: column;
        text-align: center;
    }
    
    .manual-icon {
        align-self: center;
        margin-bottom: 16px;
    }
    
    .step::before {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        margin-bottom: 8px;
    }
    
    .status-bar {
        left: 16px;
        right: 16px;
        transform: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px;
    }
    
    .header {
        padding: 16px 20px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .panel {
        padding: 20px 16px;
    }
    
    .panel-header h2 {
        font-size: 20px;
    }
    
    .manual-item {
        padding: 20px 16px;
    }
    
    .manual-text h3 {
        font-size: 18px;
    }
    
    .status-bar {
        left: 12px;
        right: 12px;
        padding: 12px 16px;
    }
}

/* Premium Section & Modal Styles */
.premium-section {
    text-align: center;
    margin: 30px 0;
}

.btn-premium-header {
    background: linear-gradient(135deg, #ff6b6b, #ffa726);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-premium-header:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-premium-header:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-premium-header:hover:before {
    left: 100%;
}

.btn-premium {
    background: linear-gradient(135deg, #ff6b6b, #ffa726);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-premium:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-premium:hover:before {
    left: 100%;
}

/* Premium Modal */
.premium-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.premium-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-modal-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.premium-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 25px;
}

.premium-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.premium-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

.premium-card {
    padding: 0 30px 30px;
    animation: fadeInUp 0.4s ease;
}

.premium-card-loading {
    padding: 60px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 107, 107, 0.2);
    border-top: 3px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.premium-features h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.features-list {
    list-style: none;
    margin-bottom: 30px;
}

.features-list li {
    padding: 12px 0;
    font-size: 1rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list li:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.premium-pricing {
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 167, 38, 0.1));
    border-radius: var(--radius-md);
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.price-tag {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 10px;
}

.price-amount {
    font-size: 3rem;
    font-weight: 700;
    color: #ff6b6b;
}

.price-currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ff6b6b;
    margin-left: 5px;
}

.price-period {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-left: 5px;
}

.price-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.premium-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-premium-upgrade {
    background: linear-gradient(135deg, #ff6b6b, #ffa726);
    color: white;
    border: none;
    padding: 16px 30px;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.btn-premium-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-premium-cancel {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid rgba(0, 0, 0, 0.1);
    padding: 12px 30px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-premium-cancel:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Premium Modal Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .btn-premium-header {
        align-self: flex-end;
        font-size: 0.8rem;
        padding: 8px 16px;
    }
    
    .premium-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .premium-modal-header,
    .premium-card {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .premium-modal-title {
        font-size: 1.3rem;
    }
    
    .price-amount {
        font-size: 2.5rem;
    }
    
    .premium-actions {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .header-content {
        gap: 10px;
    }
    
    .btn-premium-header {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}