:root {
    --primary-color: #1A0B2E;
    /* Deep Royal Purple */
    --secondary-color: #D4AF37;
    /* Metallic Gold */
    --secondary-light: #f0e68c;
    --bg-color: #0f0518;
    /* Deep night purple */
    --bg-dark: #1A0B2E;
    --text-color: #ffffff;
    --text-muted: #cccccc;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
    --input-bg: rgba(255, 255, 255, 0.05);
    /* Glass feel */
    --border-color: rgba(212, 175, 55, 0.2);
    --font-ar: 'IBM Plex Sans Arabic', 'Cairo', sans-serif;
    --font-en: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-ar);
    background-color: var(--bg-dark);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(26, 11, 46, 0.5) 0%, rgba(26, 11, 46, 0.95) 100%);
    z-index: -1;
}

.container {
    background: rgba(26, 11, 46, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* Header & Logo */
header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 20px;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.kfu-logo-img {
    height: 80px;
    object-fit: contain;
}

header h1 {
    font-family: var(--font-ar);
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #fff;
}

.subtitle {
    font-family: var(--font-ar);
    font-size: 14px;
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

.alert-error {
    background: rgba(231, 76, 60, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.alert-success {
    background: rgba(46, 204, 113, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

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

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 15px;
    color: #fff;
}

.input-readonly {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 16px;
    text-align: center;
    letter-spacing: 2px;
}

.input-text {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    text-align: right;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.input-text:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

/* Rating */
.rating-group {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    background: var(--input-bg);
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.rating-group input {
    display: none;
}

.rating-group label {
    cursor: pointer;
    width: 65px;
    height: 65px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 0;
    transform-style: preserve-3d;
    overflow: hidden;
}

.rating-group label .emoji-3d {
    width: 30px;
    height: 30px;
    object-fit: contain;
    margin-bottom: 2px;
    filter: grayscale(100%) opacity(0.8);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateZ(5px);
}

.rating-group label .num {
    font-size: 14px;
    font-weight: 700;
    transform: translateZ(5px);
}

.rating-group input:checked+label {
    background: rgba(212, 175, 55, 0.15);
    color: var(--secondary-color);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4), inset 0 0 10px rgba(212, 175, 55, 0.2);
    transform: scale(1.1) translateY(-2px);
    border: 1px solid var(--secondary-color);
    overflow: visible;
}

.rating-group input:checked+label .emoji-3d {
    filter: grayscale(0%) opacity(1) drop-shadow(0 5px 8px rgba(0, 0, 0, 0.4));
    transform: translateZ(10px) scale(1.1);
    animation: float3D 2s ease-in-out infinite;
}

.rating-group label:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--secondary-color);
    transform: translateY(-2px);
}

.rating-group label:hover .emoji-3d {
    filter: grayscale(0%) opacity(0.9) drop-shadow(0 3px 5px rgba(0, 0, 0, 0.3));
    transform: translateZ(8px) scale(1.05);
}

@keyframes float3D {
    0% {
        transform: translateZ(10px) scale(1.1) translateY(0);
    }

    50% {
        transform: translateZ(15px) scale(1.1) translateY(-3px);
    }

    100% {
        transform: translateZ(10px) scale(1.1) translateY(0);
    }
}

.rating-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Radio */
.radio-options {
    display: flex;
    gap: 15px;
}

.radio-label {
    flex: 1;
    position: relative;
    cursor: pointer;
    margin: 0;
}

.radio-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.custom-radio {
    display: block;
    padding: 12px;
    text-align: center;
    background: var(--input-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.radio-label input:checked~.custom-radio {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

/* WhatsApp Button */
.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-top: 15px;
    padding: 14px;
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.3);
    border-radius: 12px;
    color: #25D366;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-btn:hover {
    background: rgba(37, 211, 102, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(37, 211, 102, 0.2);
    border-color: rgba(37, 211, 102, 0.5);
}

.whatsapp-icon {
    width: 26px;
    height: 26px;
    fill: currentColor;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Textarea */
textarea {
    width: 100%;
    padding: 15px;
    background: var(--input-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

/* Buttons */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(45deg, var(--secondary-color), var(--secondary-light));
    color: var(--primary-color);
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-ar);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.6);
}

.submit-btn.outline {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    box-shadow: none;
}

.submit-btn.outline:hover {
    background: rgba(212, 175, 55, 0.1);
}

/* Demo specific */
.demo-generator {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    margin-top: 30px;
}

.demo-generator h3 {
    margin-bottom: 5px;
    color: var(--text-muted);
}

.demo-generator p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.demo-generator input {
    width: 100%;
    margin-bottom: 10px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 8px;
    font-family: inherit;
    text-align: center;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 30px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Admin Table */
.admin-container {
    max-width: 1200px;
}

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

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th,
td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--secondary-color);
    font-weight: 600;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Generator box */
.result-box {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.generated-url {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    color: var(--secondary-color);
    direction: ltr;
    word-break: break-all;
    margin: 15px 0;
    font-family: monospace;
    font-size: 16px;
}

.copy-btn {
    background: var(--secondary-color);
    color: var(--bg-dark);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    /* Fix Logos Overflow */
    .kfu-logo-img {
        height: 60px;
        max-width: 100%;
        object-fit: contain;
    }

    .logo img+img {
        height: 40px !important;
        max-width: 90%;
        object-fit: contain;
    }

    header h1 {
        font-size: 20px;
    }

    .subtitle {
        font-size: 12px;
    }

    /* Fix Emojis Overlap */
    .rating-group {
        gap: 8px;
    }

    .rating-group label {
        width: 48px;
        height: 48px;
        font-size: 14px;
        border-radius: 8px;
    }

    .rating-group label .emoji-3d {
        width: 22px;
        height: 22px;
        margin-bottom: 2px;
    }

    .rating-group label .num {
        font-size: 12px;
    }

    .rating-labels {
        font-size: 13px;
        margin-top: 10px;
    }

    .radio-label {
        padding: 10px;
        font-size: 14px;
    }
}