:root {
            --primary: #272728;
            --primary-dark: #4f46e5;
            --secondary: #10b981;
            --light-bg: #f9fafb;
            --card-bg: #ffffff;
            --text: #1f2937;
            --border: #e5e7eb;
            --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
            --radius: 16px;
            --radius-sm: 10px;
        }



        .container {
            max-width: 1200px;
            margin: -16px auto;
            padding: 0px;
        }

        .app-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            flex-wrap: wrap;
            gap: 20px;
        }

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

.logo-icon {
    background: linear-gradient(135deg, #fecd3d, #ffea80);
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

        .logo-text h1 {
            font-size: 1.8rem;
            font-weight: 700;
        
            margin-bottom: 4px;
        }

        .logo-text p {
            font-size: 0.95rem;
        
        }

        .ai-badge {
            background: linear-gradient(135deg, #ff6b6b, #ffa726);
            color: white;
            padding: 8px 18px;
            border-radius: 30px;
            font-weight: 600;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 8px;
            box-shadow: 0 4px 12px rgba(255, 107, 107, 0.25);
        }

        .main-layout {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 30px;
            margin-bottom: 40px;
        }

        @media (max-width: 992px) {
            .main-layout {
                grid-template-columns: 1fr;
            }
        }

.form-card {
    border-radius: var(--radius);
    height: fit-content;
    transition: transform 0.3s, box-shadow 0.3s;
}



        .card-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 2px solid var(--border);
        }

        .card-header i {
            color: var(--primary);
            font-size: 1.5rem;
        }

        .card-header h2 {
            font-size: 1.5rem;
            font-weight: 600;
        
        }

        .form-group {
            margin-bottom: 25px;
        }

        .form-group label {
            display: block;
            margin-bottom: 10px;
            font-weight: 600;
        
            font-size: 1.05rem;
        }

        .form-group .label-note {
            font-weight: normal;
            font-size: 0.9rem;
        
            margin-top: 5px;
        }

        .textarea-container {
            position: relative;
        }

textarea {
    width: 100%;
    padding: 18px;
    background-color: #f8f9fa;
    border: 2px solid #7a7a7a;
    border-radius: var(--radius-sm);
    resize: vertical;
    min-height: 180px;
    font-size: 1rem;
    font-family: 'Noto Sans Arabic', sans-serif;
    line-height: 1.7;
    transition: all 0.3s;
}

        textarea:focus {
            outline: none;
            border-color: var(--primary);
            background-color: white;
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
        }

        .char-count {
            text-align: left;
            font-size: 0.85rem;
        
            margin-top: 8px;
        }

        .quick-prompts {
            margin-bottom: 30px;
        }

        .quick-prompts h3 {
            font-size: 1.1rem;
            margin-bottom: 15px;
        
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .quick-prompts h3 i {
            color: var(--secondary);
        }

        .prompt-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
        }

.prompt-btn {
    padding: 3px 39px;
    background-color: #f0f9ff;
    border: 2px solid #dbeafe;
    color: var(--primary);
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

        .prompt-btn:hover {
            background-color: #e0f2fe;
            transform: translateY(-2px);
        }

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

.generate-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #262626, #0e0e0e);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s;
    margin-top: 10px;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
}

        .generate-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 25px rgba(99, 102, 241, 0.35);
        }

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

        .generate-btn:disabled {
            opacity: 0.7;
            cursor: not-allowed;
            transform: none;
        }

        .result-card {
            border-radius: var(--radius);
            padding: 30px;
            box-shadow: var(--shadow);
            display: flex;
            flex-direction: column;
        }

        .result-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 2px solid var(--border);
        }

        .result-title {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .result-title i {
            color: var(--secondary);
            font-size: 1.5rem;
        }

        .result-title h2 {
            font-size: 1.5rem;
            font-weight: 600;
        
        }

        .result-status {
            background-color: #ff884a;
            padding: 6px 14px;
            border-radius: 30px;
            font-size: 0.9rem;
            font-weight: 500;
        
        }

        .result-status.active {
            background-color: #d1fae5;
            color: #065f46;
        }

.image-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    padding: 30px;
    min-height: 400px;
    border: 2px dashed #181818;
    margin-bottom: 25px;
    transition: all 0.3s;
}

        .image-display.has-image {
            border: 2px solid var(--border);
            background-color: white;
        }

        .empty-state {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        
            padding: 30px 0;
        }

        .empty-state i {
            font-size: 5rem;
            color: #d1d5db;
            margin-bottom: 20px;
        }

        .empty-state p {
            font-size: 1.1rem;
            max-width: 300px;
        }

        .generated-image {
            max-width: 100%;
            max-height: 400px;
            border-radius: var(--radius-sm);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            display: none;
            animation: fadeIn 0.5s ease-out;
        }

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

        .loading-container {
            display: none;
            flex-direction: column;
            align-items: center;
            gap: 20px;
            padding: 40px 0;
        }

        .spinner {
            width: 60px;
            height: 60px;
            border: 4px solid rgba(99, 102, 241, 0.1);
            border-radius: 50%;
            border-top-color: var(--primary);
            animation: spin 1s ease-in-out infinite;
        }

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

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

        .loading-dots {
            display: flex;
            gap: 5px;
        }

        .loading-dots span {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background-color: var(--primary);
            animation: bounce 1.4s infinite ease-in-out both;
        }

        .loading-dots span:nth-child(1) { animation-delay: -0.32s; }
        .loading-dots span:nth-child(2) { animation-delay: -0.16s; }

        @keyframes bounce {
            0%, 80%, 100% { transform: scale(0); }
            40% { transform: scale(1); }
        }




        .action-buttons {
            display: flex;
            gap: 15px;
            margin-top: 20px;
        }

        .action-btn {
            flex: 1;
            padding: 15px;
            border-radius: var(--radius-sm);
            font-weight: 600;
            font-size: 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            cursor: pointer;
            transition: all 0.3s;
            text-decoration: none;
        }

        .download-btn {
            background: linear-gradient(135deg, var(--secondary), #0da271);
            color: white;
            border: none;
        }

        .download-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
        }

        .regenerate-btn {
            background-color: white;
            color: var(--primary);
            border: 2px solid var(--primary);
        }

        .regenerate-btn:hover {
            background-color: #f5f3ff;
            transform: translateY(-3px);
        }

        .footer {
            text-align: center;
            padding: 30px 0 20px;
        
            font-size: 0.95rem;
            border-top: 1px solid var(--border);
            margin-top: 30px;
        }

        .footer a {
            color: var(--primary);
            text-decoration: none;
            font-weight: 500;
        }

        .footer a:hover {
            text-decoration: underline;
        }

        @media (max-width: 768px) {
            .container {
                padding: 15px;
            }
            
            .app-header {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .form-card, .result-card {
                padding: 20px;
            }
            
            .card-header h2, .result-title h2 {
                font-size: 1.3rem;
            }
            
            .action-buttons {
                flex-direction: column;
            }
            
            .ai-badge {
                align-self: flex-start;
            }
        }

        @media (max-width: 480px) {
            .logo-text h1 {
                font-size: 1.5rem;
            }
            
            .prompt-buttons {
                justify-content: center;
            }
            
            .prompt-btn {
                font-size: 0.9rem;
                padding: 8px 15px;
            }
        }