* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.header-left {
    flex: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Admin Authentication */
.auth-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.admin-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 0.9rem;
}

.logout-btn {
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(220, 53, 69, 1);
}

/* Admin Login Modal Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
}

.form-error {
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.generator-section {
    margin-bottom: 3rem;
}

.generator-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.generator-form h2 {
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.8rem;
}

#websitePrompt {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 1.5rem;
    transition: border-color 0.3s ease;
}

#websitePrompt:focus {
    outline: none;
    border-color: #667eea;
}

.generate-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(238, 90, 36, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin: 0 auto;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 90, 36, 0.6);
    background: linear-gradient(45deg, #ee5a24, #ff6b6b);
}

.generate-btn:active {
    transform: translateY(0);
}

.generate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.progress-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
}

.progress-section h2 {
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.8rem;
}

.progress-container {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

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

.progress-status {
    text-align: center;
    color: #666;
    font-weight: 500;
}

/* Steps Indicator */
.steps-indicator {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    position: relative;
}

.steps-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background: white;
    padding: 0 10px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    transition: color 0.3s ease;
}

.step.active .step-number {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    transform: scale(1.1);
}

.step.active .step-label {
    color: #667eea;
    font-weight: 600;
}

.step.completed .step-number {
    background: #4caf50;
    color: white;
}

.step.completed .step-label {
    color: #4caf50;
}

/* Enhanced Code Editor */
.code-editor-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.editor-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab:hover {
    background: #e9ecef;
}

.tab.active {
    background: white;
    border-bottom-color: #667eea;
    color: #667eea;
}

.tab-icon {
    font-size: 1rem;
}

.tab-text {
    font-weight: 500;
}

.editor-content {
    max-height: 500px;
}

.code-preview {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-name {
    font-weight: 600;
    color: #333;
    font-family: 'Courier New', monospace;
}

.file-size {
    color: #666;
    font-size: 0.9rem;
}

.code-actions {
    display: flex;
    gap: 0.5rem;
}

.code-action-btn {
    background: #e9ecef;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.code-action-btn:hover {
    background: #667eea;
    color: white;
}

.code-action-btn.active {
    background: #667eea;
    color: white;
}

.code-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    background: #1e1e1e;
    max-height: 400px;
}

.code-content pre {
    margin: 0;
    padding: 1.5rem;
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    overflow-y: auto;
    flex: 1;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.websites-container {
    margin-bottom: 3rem;
}

.websites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.websites-header h2 {
    font-size: 2rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.websites-stats {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.stat-item {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.stat-item strong {
    color: white;
}

.websites-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.websites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.website-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.website-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.website-preview {
    width: 100%;
    height: 200px;
    border-bottom: 3px solid #667eea;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.website-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
    transform: scale(0.3);
    transform-origin: 0 0;
    width: 333.33%;
    height: 333.33%;
}

.website-preview-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
}

.website-info {
    padding: 1.5rem;
}

.website-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.website-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.website-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: #999;
}

.website-date {
    font-weight: 500;
}

.website-size {
    background: #f0f0f0;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
}

.website-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.website-btn {
    flex: 1;
    min-width: 100px;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.website-btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

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

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

.website-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.website-btn-success {
    background: #28a745;
    color: white;
}

.website-btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.website-link {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.website-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

footer {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.8);
    margin-top: 3rem;
}

/* Animation for typing effect */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .generator-form {
        padding: 1.5rem;
    }
    
    .websites-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .generate-btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
    
    .editor-tabs {
        overflow-x: auto;
    }
    
    .tab {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .code-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .code-content pre {
        font-size: 0.8rem;
        padding: 1rem;
    }
    
    /* Mobile-specific fixes for code editor */
    .code-editor-container {
        margin: 1rem -1rem;
        border-radius: 0;
        max-width: 100vw;
        width: 100vw;
    }
    
    .code-content {
        max-height: 300px;
    }
    
    .code-content pre {
        font-size: 0.75rem;
        padding: 0.75rem;
        line-height: 1.3;
        word-break: break-all;
        word-wrap: break-word;
        white-space: pre-wrap;
        max-width: 100%;
    }
    
    /* Hide line numbers on mobile to save space */
    .line-numbers {
        display: none;
    }
    
    /* Steps indicator mobile fixes */
    .steps-indicator {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .steps-indicator::before {
        display: none;
    }
    
    .step {
        flex-direction: row;
        justify-content: flex-start;
        padding: 0;
        background: transparent;
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 0.5rem;
    }
    
    .step-number {
        margin-bottom: 0;
        margin-right: 1rem;
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .step-label {
        text-align: left;
        font-size: 0.85rem;
    }
    
    /* Progress section mobile fixes */
    .progress-section {
        padding: 1rem;
        margin: 1rem -1rem;
        border-radius: 0;
    }
    
    .progress-section h2 {
        font-size: 1.5rem;
    }
    
    /* Generator form mobile fixes */
    .generator-form {
        padding: 1rem;
        margin: 1rem -1rem;
        border-radius: 0;
    }
    
    .generator-form h2 {
        font-size: 1.5rem;
    }
    
    #websitePrompt {
        min-height: 100px;
        font-size: 0.9rem;
    }
    
    /* Header mobile fixes */
    .header-content {
        padding: 2rem 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    header h1 {
        font-size: 1.8rem;
        text-align: center;
    }
    
    header p {
        font-size: 1rem;
        text-align: center;
    }
    
    .header-right {
        width: 100%;
        justify-content: center;
    }
    
    /* Main content mobile fixes */
    main {
        padding: 1rem;
    }
    
    /* Websites section mobile fixes */
    .websites-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .websites-stats {
        justify-content: center;
        gap: 1rem;
    }
    
    .websites-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .website-card {
        margin: 0 -1rem;
        border-radius: 0;
    }
    
    .website-info {
        padding: 1rem;
    }
    
    .website-actions {
        flex-direction: column;
    }
    
    .website-btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Modal mobile fixes */
    .modal-content {
        width: 98%;
        max-height: 98vh;
        margin: 1vh auto;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 1rem;
        max-height: 70vh;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .website-preview-frame {
        height: 250px;
    }
}
/* Plan highlighting styles */
.plan-number {
    color: #667eea;
    font-weight: bold;
}

.plan-highlight {
    background: #f0f8ff;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 600;
}
/* IDE-like syntax highlighting */
.keyword { color: #ff79c6; }
.tag { color: #ff79c6; }
.string { color: #ce9178; }
.number { color: #bd93f9; }
.comment { color: #6a9955; font-style: italic; }
.operator { color: #d4d4d4; }
.function { color: #61afef; }
.variable { color: #d19a66; }
.property { color: #d19a66; }
.attribute { color: #98c379; }
/* Complete IDE-like code editor */
.code-editor-container {
    background: #1e1e1e;
    border: 1px solid #444756;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.code-preview {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.code-content pre {
    margin: 0;
    padding: 1.5rem;
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Fira Code', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    overflow-y: auto;
    max-height: 500px;
    white-space: pre-wrap;
    word-wrap: break-word;
    tab-size: 4;
    border: 1px solid #333;
    border-radius: 4px;
    position: relative;
}

/* Line numbers styling */
.line-numbers {
    width: 50px;
    min-width: 50px;
    background: #2d3748;
    color: #8b92a7;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: right;
    padding: 1.5rem 0.5rem;
    border-right: 1px solid #444756;
    user-select: none;
    overflow-y: auto;
    white-space: pre;
}

/* Sync scrolling between line numbers and code */
.line-numbers::-webkit-scrollbar {
    display: none;
}

/* Enhanced scrollbar */
.code-content pre::-webkit-scrollbar {
    width: 12px;
}

.code-content pre::-webkit-scrollbar-track {
    background: #2d3748;
}

.code-content pre::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 6px;
}

.code-content pre::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.website-preview-container {
    margin-bottom: 2rem;
}

.website-preview-container h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.2rem;
}

.website-preview-frame {
    width: 100%;
    height: 300px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    overflow: hidden;
    position: relative;
}

.website-preview-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.website-info-modal h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.2rem;
}

.website-info-modal p {
    margin-bottom: 0.5rem;
    color: #666;
    line-height: 1.5;
}

.website-info-modal strong {
    color: #333;
}

.modal-footer {
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-top: 1px solid #e0e0e0;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

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

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

/* Modal Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-footer {
        padding: 1rem 1.5rem;
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .website-preview-frame {
        height: 200px;
    }
/* No websites message */
.no-websites-message {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}
}