/* ========================================
   Reset & Base
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

body {
    background: #f5f7fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ========================================
   Layout
   ======================================== */
.site-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    overflow-y: auto;
}

.site-wrapper::-webkit-scrollbar {
    width: 6px;
}

.site-wrapper::-webkit-scrollbar-track {
    background: #e2e8f0;
}

.site-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
    background: #1e293b !important;
    padding: 12px 0;
    flex-shrink: 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: white !important;
}

.navbar-brand i {
    color: #3b82f6;
    margin-left: 8px;
}

.nav-link {
    font-size: 0.85rem;
    padding: 6px 12px !important;
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: white !important;
    transform: translateY(-2px);
}

.nav-link i {
    margin-left: 5px;
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    flex: 1;
    padding: 40px 0;
    background: #f5f7fa;
    display: flex;
    align-items: center;
}

.main-content .container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ========================================
   Cards
   ======================================== */
.card {
    background: white;
    border: none;
    border-radius: 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 2.5rem !important;
}

/* ========================================
   Icon Circle
   ======================================== */
.icon-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px !important;
}

.icon-circle i {
    font-size: 2.2rem;
    color: white;
}

/* ========================================
   Typography
   ======================================== */
h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px !important;
}

.text-muted {
    font-size: 0.9rem;
    color: #64748b !important;
    margin-bottom: 30px !important;
}

/* ========================================
   Form
   ======================================== */
.form-control {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.input-group-text {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
    font-size: 0.9rem;
    color: #3b82f6;
}

.domain-text {
    font-size: 0.8rem;
    font-family: monospace;
}

small {
    font-size: 0.7rem !important;
    color: #64748b;
}

/* ========================================
   Buttons
   ======================================== */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 14px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

/* ========================================
   Result Box (الصفحة الرئيسية)
   ======================================== */
.result-box {
    background: #f0fdf4;
    padding: 16px;
    border-radius: 18px;
    border-right: 4px solid #22c55e;
}

.result-url-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.result-url-section a {
    flex: 1;
    font-size: 0.85rem;
    word-break: break-all;
    color: #22c55e;
    text-decoration: none;
    font-family: monospace;
    background: white;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid #dcfce7;
}

.result-url-section a:hover {
    text-decoration: underline;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.copy-btn, .qr-btn {
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.copy-btn {
    background: #22c55e;
}

.copy-btn:hover {
    background: #16a34a;
    transform: translateY(-2px);
}

.qr-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.qr-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
}

/* ========================================
   QR Code Section (الصفحة الرئيسية)
   ======================================== */
.qr-wrapper {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    text-align: center;
    animation: fadeInUp 0.4s ease-out;
}

.qr-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.qr-title i {
    color: #3b82f6;
    font-size: 1rem;
}

.qr-image-wrapper {
    background: white;
    padding: 12px;
    border-radius: 16px;
    display: inline-block;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.qr-image-wrapper:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

#qrImage {
    display: block;
    max-width: 130px;
    height: auto;
    border-radius: 12px;
}

.qr-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 8px;
}

.qr-download-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.qr-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
}

.qr-print-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.qr-print-btn:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

/* ========================================
   Register Banner
   ======================================== */
.register-banner {
    background: #eff6ff;
    padding: 12px;
    border-radius: 14px;
    text-align: center;
    font-size: 0.8rem;
    margin-top: 20px !important;
}

.register-banner i {
    color: #3b82f6;
    margin-left: 6px;
}

.register-banner a {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
}

.register-banner a:hover {
    text-decoration: underline;
}

/* ========================================
   Carousel Section
   ======================================== */
.carousel {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-radius: 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 30px;
}

.carousel-inner {
    padding: 40px 20px;
}

.carousel-card {
    text-align: center;
    padding: 20px;
}

.carousel-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.carousel-icon i {
    font-size: 2.2rem;
    color: white;
}

.carousel-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.carousel-card p {
    font-size: 0.95rem;
    color: #64748b;
    max-width: 500px;
    margin: 0 auto 15px;
    line-height: 1.6;
}

.carousel-tag {
    display: inline-block;
    background: #eff6ff;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #3b82f6;
}

.carousel-control-prev,
.carousel-control-next {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.carousel-control-prev {
    left: 15px;
}

.carousel-control-next {
    right: 15px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(1);
    width: 20px;
    height: 20px;
}

.carousel-indicators {
    bottom: 10px;
}

.carousel-indicators button {
    width: 30px;
    height: 3px;
    background-color: #cbd5e1;
    border-radius: 3px;
}

.carousel-indicators button.active {
    background-color: #3b82f6;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: #1e293b;
    padding: 15px 0;
    text-align: center;
    flex-shrink: 0;
}

.footer p {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer i {
    margin-left: 5px;
}

/* ========================================
   Animations
   ======================================== */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}

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

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

/* ========================================
   Toast Messages
   ======================================== */
.toast-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 250px;
    text-align: center;
    animation: slideDown 0.3s ease-out;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-right: 4px solid #22c55e;
    padding: 10px 16px;
    font-size: 0.8rem;
    font-weight: 500;
}

.toast-message.alert-danger {
    border-right-color: #ef4444;
}

.toast-message i {
    margin-left: 8px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ========================================
   URL Cut Page Styles (صفحة إدخال المحتوى)
   ======================================== */

/* البطاقة الرئيسية */
.urlcut-card {
    background: white;
    border-radius: 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 20px;
}

/* الهيدر */
.urlcut-header {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    padding: 35px;
    text-align: center;
    color: white;
}

.urlcut-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.urlcut-icon i {
    font-size: 2rem;
    color: #3b82f6;
}

.urlcut-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.urlcut-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

/* الجسم */
.urlcut-body {
    padding: 30px;
}

/* عناوين الأقسام */
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
}

.section-title i {
    color: #3b82f6;
    font-size: 1rem;
}

/* شبكة أنواع المحتوى */
.content-type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.content-type-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.content-type-item i {
    font-size: 1.2rem;
    color: #64748b;
    display: block;
    margin-bottom: 6px;
}

.content-type-item span {
    font-size: 0.65rem;
    color: #475569;
}

.content-type-item:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.content-type-item.active {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.content-type-item.active i,
.content-type-item.active span {
    color: white;
}

/* حقول الإدخال */
.input-section {
    margin-bottom: 18px;
}

/* أزرار الإجراءات */
.action-buttons {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.btn-generate {
    flex: 1;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-qr-preview {
    flex: 1;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-qr-preview:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

/* نتيجة الاختصار */
.urlcut-result {
    background: #f0fdf4;
    border-radius: 16px;
    padding: 16px;
    margin-top: 15px;
    border-right: 3px solid #22c55e;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #166534;
    font-weight: 600;
    font-size: 0.8rem;
}

.result-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: white;
    padding: 8px 12px;
    border-radius: 10px;
}

.result-link a {
    flex: 1;
    font-family: monospace;
    font-size: 0.75rem;
    color: #22c55e;
    word-break: break-all;
    text-decoration: none;
}

.result-link a:hover {
    text-decoration: underline;
}

.copy-result-btn {
    background: #22c55e;
    border: none;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.65rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-result-btn:hover {
    background: #16a34a;
}

.result-qr {
    margin-top: 12px;
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid #bbf7d0;
}

.result-qr img {
    max-width: 80px;
    border-radius: 10px;
}

.download-qr-small {
    display: block;
    margin: 6px auto 0;
    background: #f1f5f9;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.6rem;
    cursor: pointer;
}

/* معاينة QR */
.qr-preview-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    width: 90%;
    max-width: 380px;
    display: none;
    flex-direction: column;
    animation: fadeInUp 0.3s ease-out;
}

.qr-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: 0.9rem;
}

.qr-preview-header i {
    color: #3b82f6;
    margin-left: 6px;
}

.close-preview {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
}

.qr-preview-body {
    padding: 25px;
    text-align: center;
}

.qr-preview-body img {
    max-width: 180px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.qr-preview-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 18px;
}

.btn-download-qr,
.btn-analyze-qr {
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-download-qr {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.btn-download-qr:hover {
    transform: translateY(-2px);
}

.btn-analyze-qr {
    background: #f1f5f9;
    color: #475569;
}

.btn-analyze-qr:hover {
    background: #e2e8f0;
}

/* Pro Banner */
.pro-banner {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 14px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.pro-banner i {
    color: #f59e0b;
    font-size: 1.1rem;
}

.pro-banner span {
    font-weight: 600;
    color: #92400e;
    font-size: 0.8rem;
}

.pro-link {
    background: #f59e0b;
    color: white;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pro-link:hover {
    background: #d97706;
    color: white;
    text-decoration: none;
}

/* ========================================
   Icons Spacing
   ======================================== */
.fa, .fas, .far {
    margin-left: 5px;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1200px) {
    .main-content .container {
        max-width: 1100px;
    }
}

@media (max-width: 992px) {
    .main-content .container {
        max-width: 900px;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .carousel-inner {
        padding: 30px 15px;
    }
    
    .carousel-icon {
        width: 65px;
        height: 65px;
    }
    
    .carousel-icon i {
        font-size: 1.8rem;
    }
    
    .carousel-card h3 {
        font-size: 1.3rem;
    }
    
    .urlcut-header {
        padding: 25px;
    }
    
    .urlcut-header h2 {
        font-size: 1.4rem;
    }
    
    .content-type-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 30px 0;
    }
    
    .main-content .container {
        padding: 0 20px;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    .text-muted {
        font-size: 0.8rem;
    }
    
    .icon-circle {
        width: 65px;
        height: 65px;
    }
    
    .icon-circle i {
        font-size: 1.8rem;
    }
    
    .form-control, .input-group-text {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    
    .btn-primary {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .carousel-inner {
        padding: 25px 12px;
    }
    
    .carousel-icon {
        width: 55px;
        height: 55px;
    }
    
    .carousel-icon i {
        font-size: 1.5rem;
    }
    
    .carousel-card h3 {
        font-size: 1.1rem;
    }
    
    .carousel-card p {
        font-size: 0.75rem;
    }
    
    .carousel-tag {
        font-size: 0.7rem;
        padding: 4px 12px;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 32px;
        height: 32px;
    }
    
    .urlcut-body {
        padding: 20px;
    }
    
    .content-type-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .content-type-item {
        padding: 8px 4px;
    }
    
    .content-type-item i {
        font-size: 1rem;
    }
    
    .content-type-item span {
        font-size: 0.6rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .pro-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .footer {
        padding: 10px 0;
    }
    
    .footer p {
        font-size: 0.65rem;
    }
}

@media (max-width: 640px) {
    .result-url-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .result-actions {
        justify-content: center;
    }
    
    .copy-btn, .qr-btn {
        padding: 6px 12px;
        font-size: 0.7rem;
    }
    
    .qr-wrapper {
        padding: 12px;
    }
    
    .qr-image-wrapper {
        padding: 8px;
    }
    
    #qrImage {
        max-width: 100px;
    }
    
    .qr-title {
        font-size: 0.75rem;
    }
    
    .qr-download-btn, .qr-print-btn {
        padding: 5px 10px;
        font-size: 0.65rem;
    }
    
    .register-banner {
        font-size: 0.7rem;
        padding: 10px;
    }
    
    .carousel-inner {
        padding: 20px 10px;
    }
    
    .carousel-icon {
        width: 45px;
        height: 45px;
    }
    
    .carousel-icon i {
        font-size: 1.2rem;
    }
    
    .carousel-card h3 {
        font-size: 1rem;
    }
    
    .carousel-card p {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .urlcut-header {
        padding: 20px;
    }
    
    .urlcut-header h2 {
        font-size: 1.2rem;
    }
    
    .content-type-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .result-link {
        flex-direction: column;
    }
    
    .result-link a {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .content-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}