@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

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

:root {
    --primary-color: #1b5e20; /* أخضر داكن */
    --secondary-color: #2e7d32; /* أخضر متوسط */
    --accent-color: #ff9800; /* برتقالي */
    --orange-light: #ffb74d; /* برتقالي فاتح */
    --light-green: #81c784; /* أخضر خفيف */
    --text-color: #1a1a1a;
    --light-bg: #f8f9fa;
    --card-bg: rgba(255, 255, 255, 0.95);
    --shadow-color: rgba(27, 94, 32, 0.2);
    --orange-shadow: rgba(255, 152, 0, 0.3);
}


/* تأثيرات الخلفية المتحركة */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes floating-shapes {
    0% { transform: translateY(0) rotate(0deg); opacity: 0.8; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 0.4; }
    100% { transform: translateY(0) rotate(360deg); opacity: 0.8; }
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, 
        var(--light-bg) 0%, 
        rgba(232, 245, 233, 0.3) 50%,
        var(--light-bg) 100%
    );
    background-size: 200% 200%;
    animation: backgroundShift 20s ease infinite;
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
    /* حماية من النسخ والاختيار */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    /* تحسينات لـ iOS */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* دعم safe area في iPhone X وما بعده */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

@keyframes backgroundShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

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

.header {
    background: linear-gradient(-45deg, 
        var(--primary-color),
        var(--secondary-color),
        var(--accent-color),
        var(--light-green)
    );
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    box-shadow: 
        0 8px 30px var(--shadow-color),
        0 4px 15px rgba(0, 0, 0, 0.2);
    color: white;
    padding: 40px 0;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 30px 30px;
}

/* أشكال متحركة في الخلفية */
.header::before,
.header::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    z-index: 0;
    animation: floating-shapes 8s infinite;
    box-shadow: 0 4px 30px rgba(255, 255, 255, 0.1);
}

.header::before {
    top: -150px;
    right: -150px;
}

.header::after {
    bottom: -150px;
    left: -150px;
    animation-delay: -4s;
}

.logo-container {
    margin-bottom: 10px;
}

.school-logo {
    width: 100px;
    height: auto;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2);
    animation: titleGlow 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 
            0 4px 8px rgba(0, 0, 0, 0.3),
            0 2px 4px rgba(0, 0, 0, 0.2);
    }
    50% {
        text-shadow: 
            0 4px 12px rgba(255, 255, 255, 0.4),
            0 2px 6px rgba(255, 255, 255, 0.3),
            0 4px 8px rgba(0, 0, 0, 0.3);
    }
}

.header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 5px;
}

.header p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.main-content {
    position: relative;
    background: #ffffff;
    padding: 40px 0;
    border-radius: 20px;
    box-shadow: 
        0 10px 30px var(--shadow-color),
        inset 0 0 50px rgba(255, 255, 255, 0.5);
    overflow: hidden;
}

.main-content .container {
    position: relative;
    z-index: 2;
}

/* تأثيرات الكتب المتحركة في الخلفية */
.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(27, 94, 32, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(27, 94, 32, 0.1) 0%, transparent 50%);
    z-index: 1;
}

@keyframes float-books {
    0% { transform: translateY(0) rotate(0deg) scale(1); }
    50% { transform: translateY(-20px) rotate(5deg) scale(1.1); }
    100% { transform: translateY(0) rotate(0deg) scale(1); }
}

@keyframes float-hearts {
    0% { transform: translateX(100vw) scale(1); opacity: 0.8; }
    100% { transform: translateX(-100px) scale(1); opacity: 0.8; }
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes pulse-line {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.heartbeat-line {
    position: absolute;
    width: 200%;
    height: 100%;
    top: 0;
    right: 0;
    pointer-events: none;
    z-index: 1;
}

.heartbeat-line::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color));
    animation: pulse-line 3s linear infinite;
    clip-path: path('M0,20 L10,20 L15,0 L20,40 L25,20 L30,20 L35,0 L40,40 L45,20 L50,20 L55,0 L60,40 L65,20 L70,20 L75,0 L80,40 L85,20 L90,20 L95,0 L100,40');
    opacity: 0.6;
}

.educational-symbols {
    display: none;
}

.symbol {
    position: absolute;
    font-size: 4.5rem;
    color: var(--primary-color);
    text-shadow: 4px 6px 8px rgba(27, 94, 32, 0.3);
    animation: heartbeat 1s ease-in-out infinite;
    filter: drop-shadow(0 8px 12px rgba(27, 94, 32, 0.3));
    z-index: 1;
    opacity: 0.6;
}

.symbol:nth-child(2n) {
    animation-delay: -0.2s;
    font-size: 5rem;
}

.symbol:nth-child(3n) {
    animation-delay: -0.4s;
    font-size: 4rem;
}

.symbol:nth-child(4n) {
    animation-delay: -0.6s;
    font-size: 5.5rem;
}

.symbol:nth-child(5n) {
    animation-delay: -0.8s;
    font-size: 4.8rem;
}

.symbol.fa-book {
    color: rgba(27, 94, 32, 0.25);
    text-shadow: 5px 8px 10px rgba(27, 94, 32, 0.35);
}

.symbol.fa-book-open {
    color: rgba(27, 94, 32, 0.2);
    text-shadow: 4px 6px 8px rgba(27, 94, 32, 0.3);
}

.symbol.fa-bookmark {
    color: rgba(27, 94, 32, 0.15);
    text-shadow: 3px 5px 7px rgba(27, 94, 32, 0.25);
}

.circle-container {
    padding: 20px 0;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.achievement-card {
    background: #ffffff;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.1),
        0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
    aspect-ratio: 1;
    padding: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 107, 53, 0.05) 0%,
        rgba(46, 125, 50, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 18px;
}

.achievement-card:hover::before {
    opacity: 1;
}

.achievement-card:hover {
    background: #ffffff;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.15),
        0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-8px) scale(1.02);
    border: 2px solid #ff6b35;
}

.achievement-card:hover h3,
.achievement-card:hover p,
.achievement-card:hover i {
    color: #ff6b35;
    text-shadow: 0 2px 4px rgba(255, 107, 53, 0.2);
}

.achievement-card .btn {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.achievement-card img {
    width: 120px;
    height: 120px;
    border-radius: 15px;    
    object-fit: cover;
    border: 3px solid #e8f5e8;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.2);
}

.achievement-card:hover img {
    border-color: #ff6b35;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
    transform: scale(1.05);
}

.achievement-card i {
    font-size: 2.5rem;
    color: #2e7d32;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.achievement-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #2e7d32;
    transition: all 0.3s ease;
    font-weight: 600;
}

.achievement-card p {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

/* تنسيق أنيق لحقل الإدخال */
.input-url {
    width: 100%;
    max-width: 600px;
    padding: 20px 30px;
    font-size: 1.1rem;
    font-family: 'Cairo', sans-serif;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    color: var(--text-color);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid transparent;
    border-radius: 50px;
    outline: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 20px rgba(27, 94, 32, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.8);
    position: relative;
    backdrop-filter: blur(10px);
}

.input-url::placeholder {
    color: #9e9e9e;
    font-weight: 400;
    transition: all 0.3s ease;
}

.input-url:hover {
    box-shadow: 
        0 6px 25px rgba(27, 94, 32, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    border-color: rgba(27, 94, 32, 0.2);
}

.input-url:focus {
    background: linear-gradient(135deg, #ffffff 0%, #f1f8f4 100%);
    border: 2px solid var(--primary-color);
    box-shadow: 
        0 8px 30px rgba(27, 94, 32, 0.2),
        0 0 0 4px rgba(27, 94, 32, 0.1),
        0 0 20px rgba(46, 125, 50, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.9),
        inset 0 0 20px rgba(27, 94, 32, 0.05);
    transform: translateY(-3px) scale(1.01);
}

.input-url:focus::placeholder {
    color: #bdbdbd;
    transform: translateX(5px);
}

/* تأثير متحرك عند الكتابة */
@keyframes inputGlow {
    0%, 100% {
        box-shadow: 
            0 8px 30px rgba(27, 94, 32, 0.2),
            0 0 0 4px rgba(27, 94, 32, 0.1),
            inset 0 2px 4px rgba(255, 255, 255, 0.9);
    }
    50% {
        box-shadow: 
            0 8px 35px rgba(27, 94, 32, 0.25),
            0 0 0 6px rgba(27, 94, 32, 0.15),
            inset 0 2px 4px rgba(255, 255, 255, 0.9);
    }
}

.input-url:focus:not(:placeholder-shown) {
    animation: inputGlow 2s ease-in-out infinite;
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .input-url {
        padding: 16px 20px;
        font-size: 1rem;
        border-radius: 40px;
    }
}

/* تنسيقات قسم تحميل الفيديوهات */
.feature-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    margin-bottom: 2rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}

.feature-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,152,0,0.1) 0%, rgba(27,94,32,0.1) 50%, transparent 70%);
    animation: rotate 30s linear infinite;
    z-index: 0;
}

.feature-section > * {
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.section-title i {
    font-size: 1.6rem;
}

.section-description {
    color: #666;
    font-size: 1rem;
    margin-bottom: 20px;
}

/* خيارات التنسيق */
.format-selector {
    margin: 25px 0;
    text-align: center;
}

.format-label {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.format-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.format-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 15px 25px;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,249,250,0.9) 100%);
    border: 2px solid rgba(224, 224, 224, 0.5);
    border-radius: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

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

.format-option:hover::before {
    left: 100%;
}

.format-option:hover {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(255,243,224,0.95) 0%, rgba(255,255,255,0.95) 100%);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px var(--orange-shadow);
}

.format-option input[type="radio"] {
    display: none;
}

.format-option input[type="radio"]:checked + span {
    color: var(--primary-color);
    font-weight: 600;
}

.format-option:has(input[type="radio"]:checked) {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(255,243,224,0.9) 0%, rgba(232,245,233,0.9) 100%);
    box-shadow: 0 4px 15px var(--orange-shadow);
}

.format-option span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.format-option span i {
    font-size: 1.1rem;
}

/* زر التحميل */
.btn-download {
    background: linear-gradient(135deg, 
        var(--accent-color),
        var(--orange-light),
        var(--secondary-color)
    );
    background-size: 200% 200%;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    position: relative;
    overflow: hidden;
    animation: gradientShift 3s ease infinite;
    box-shadow: 0 10px 30px var(--orange-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.btn-download::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-download:hover::before {
    width: 300px;
    height: 300px;
}

.btn-download:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px var(--orange-shadow);
    background: linear-gradient(135deg, 
        var(--orange-light),
        var(--accent-color),
        var(--secondary-color)
    );
}

.btn-download:active {
    transform: translateY(-1px) scale(1.02);
}

.btn-download:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* مؤشر التحميل */
.loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto;
    border: 4px solid rgba(27, 94, 32, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* نتائج التحميل */
.download-success {
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(232,245,233,0.95) 50%, rgba(255,243,224,0.95) 100%);
    border: 2px solid var(--accent-color);
    border-radius: 25px;
    padding: 30px;
    margin: 20px auto;
    max-width: 700px;
    box-shadow: 0 15px 40px rgba(27, 94, 32, 0.2);
    backdrop-filter: blur(10px);
    animation: slideInSuccess 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

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

.download-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shineSuccess 2s infinite;
}

@keyframes shineSuccess {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.video-info {
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: right;
    flex-wrap: wrap;
    justify-content: center;
}

.video-thumbnail {
    width: 200px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 3px solid white;
}

.video-details {
    flex: 1;
    min-width: 250px;
}

.video-details h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.video-title {
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 10px 0;
    line-height: 1.6;
}

.video-duration,
.video-size {
    color: #666;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn-download-file {
    margin-top: 15px;
    background: linear-gradient(135deg, 
        var(--accent-color),
        var(--orange-light),
        var(--secondary-color)
    );
    padding: 12px 25px;
    display: inline-block;
    text-decoration: none;
    color: white;
    border-radius: 25px;
    box-shadow: 0 5px 15px var(--orange-shadow);
    transition: all 0.3s ease;
}

.btn-download-file:hover {
    background: linear-gradient(135deg, 
        var(--orange-light),
        var(--accent-color),
        var(--secondary-color)
    );
    transform: scale(1.05);
    box-shadow: 0 8px 25px var(--orange-shadow);
}

.download-error {
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
    border: 2px solid #e57373;
    border-radius: 20px;
    padding: 20px;
    margin: 20px auto;
    max-width: 600px;
    color: #c62828;
    box-shadow: 0 4px 15px rgba(198, 40, 40, 0.1);
}

.download-error p {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.error-msg {
    color: #c62828;
    background: #ffebee;
    padding: 15px 20px;
    border-radius: 15px;
    margin: 20px auto;
    max-width: 500px;
    border: 2px solid #e57373;
    font-size: 1rem;
}

.success-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    border: 2px solid var(--accent-color);
    border-radius: 20px;
    padding: 20px;
    margin: 20px auto;
    max-width: 600px;
    box-shadow: 0 4px 15px rgba(27, 94, 32, 0.15);
}

.success-box h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.success-box a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    word-break: break-all;
    display: block;
    padding: 10px;
    background: white;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.success-box a:hover {
    background: var(--light-green);
    color: white;
    transform: translateY(-2px);
}

/* تحسينات للشاشات الصغيرة - قسم التحميل */
@media (max-width: 768px) {
    .format-options {
        flex-direction: column;
        align-items: stretch;
    }
    
    .format-option {
        justify-content: center;
    }
    
    .video-info {
        flex-direction: column;
        text-align: center;
    }
    
    .video-thumbnail {
        width: 100%;
        max-width: 300px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

.btn {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(to right, 
        var(--primary-color),
        var(--secondary-color)
    );
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px var(--shadow-color);
    border: none;
}

.btn:hover {
    background: linear-gradient(to right, 
        var(--secondary-color),
        var(--accent-color)
    );
    box-shadow: 0 6px 20px var(--shadow-color);
    transform: scale(1.05);
}

.footer {
    background: linear-gradient(to right,
        var(--primary-color),
        var(--secondary-color)
    );
    box-shadow: 0 -4px 20px var(--shadow-color);
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 60px;
    /* حماية من النسخ */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.footer strong {
    color: var(--accent-color);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.achievement-card i {
    animation: float 3s ease-in-out infinite;
}

/* تنسيق شريط التنقل */
.navbar {
    margin-top: 20px;
    padding: 15px 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.15),
        rgba(255, 255, 255, 0.08)
    );
    backdrop-filter: blur(8px);
    border-radius: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    border-left: none;
    border-right: none;
    box-shadow: 0 8px 32px 0 var(--shadow-color);
    position: relative;
    overflow: hidden;
    width: 100%;
    left: 0;
    right: 0;
}

.navbar::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: 0.5s;
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

.nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    padding: 0 20px;
    position: relative;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: block;
    font-size: 1rem;
    text-align: center;
    letter-spacing: 0.5px;
    z-index: 1;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    border-radius: 10px;
}

.nav-link:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 5px 15px var(--shadow-color);
    transform: translateY(-3px);
    letter-spacing: 1px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* تأثيرات إضافية للنص */
.nav-link br {
    display: block;
    content: "";
    margin-top: 5px;
}

.nav-link:hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* تحسين التجاوب للشاشات الصغيرة */
@media (max-width: 1200px) {
    .nav-list {
        gap: 15px;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
}

@media (max-width: 900px) {
    .navbar {
        padding: 10px;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .nav-link {
        width: 100%;
        max-width: 400px;
        text-align: center;
        padding: 12px 20px;
    }
    
    .nav-link:hover {
        transform: translateY(-2px) scale(1.02);
    }
}

@media (max-width: 600px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .header h2 {
        font-size: 1.4rem;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .achievement-card {
        border-radius: 20px;
        aspect-ratio: auto;
        padding: 30px;
    }
}

/* تنسيقات صفحة النتائج */
.results-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding: 20px;
}

.results-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px 0 var(--shadow-color);
    backdrop-filter: blur(10px);
}

.chart-container {
    width: 100%;
    height: 300px;
    margin-top: 20px;
}

.subjects-analysis {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.subject-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.subject-item i {
    font-size: 24px;
    color: var(--primary-color);
}

.subject-item h4 {
    margin: 0;
    min-width: 120px;
}

.progress-bar {
    flex: 1;
    background: rgba(0, 0, 0, 0.1);
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    transition: width 1s ease-in-out;
}

.recommendations {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.recommendation-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.recommendation-item:hover {
    transform: translateX(-5px);
}

.recommendation-item i {
    font-size: 20px;
    color: var(--primary-color);
}

.recommendation-item p {
    margin: 0;
}

@media (max-width: 900px) {
    .results-section {
        grid-template-columns: 1fr;
    }
}

.skills-analysis {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.skill-item {
    background: rgba(255, 255, 255, 0.5);
    padding: 15px;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.skill-item:hover {
    transform: translateX(-5px);
    background: rgba(255, 255, 255, 0.7);
}

.skill-item h4 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

/* تحسينات إضافية للرسوم البيانية */
.chart-container {
    position: relative;
    margin: 20px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.chart-container:hover {
    transform: scale(1.02);
}

/* تنسيقات مؤشرات النمو */
.growth-indicators {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.indicator-item {
    background: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.indicator-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.indicator-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.indicator-content h4 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.indicator-content p {
    margin: 5px 0 0 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

/* تنسيقات تحليل المجالات */
.domains-analysis {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.domain-item {
    background: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.domain-item:hover {
    transform: translateX(-5px);
    background: rgba(255, 255, 255, 0.7);
}

.domain-item h4 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

.domain-item p {
    margin: 10px 0 0 0;
    color: #666;
}

/* تنسيقات التوصيات */
.recommendation-content {
    flex: 1;
}

.recommendation-content h4 {
    margin: 0 0 5px 0;
    color: var(--primary-color);
}

.recommendation-content p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .growth-indicators {
        grid-template-columns: 1fr;
    }
}

/* تنسيقات زر التوجل للقائمة */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    position: absolute;
    left: 20px;
    top: 20px;
    z-index: 100;
    transition: all 0.3s ease;
}

.navbar-toggle:hover {
    transform: scale(1.1);
}

@media (max-width: 900px) {
    .navbar-toggle {
        display: block;
    }
    
    .navbar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        padding: 80px 20px 20px;
        transition: all 0.4s ease-in-out;
        z-index: 99;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
        border-radius: 0;
    }
    
    .navbar.active {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .nav-link {
        width: 100%;
        padding: 15px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.1);
    }
    
    .nav-link:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateX(-10px);
    }

    /* تعديل الشفافية عند فتح القائمة */
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 98;
    }

    .overlay.active {
        display: block;
    }
}

/* تعديل تنسيق حاوية شريط التنقل */
.header .navbar-container {
    width: 100%;
    margin: 0;
    padding: 0;
    max-width: 100%;
}

.navbar-container .navbar {
    margin-left: 0;
    margin-right: 0;
    border-left: 0;
    border-right: 0;
}

@media (max-width: 900px) {
    .navbar-toggle {
        display: block;
    }
    
    .navbar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        padding: 80px 20px 20px;
        transition: all 0.4s ease-in-out;
        z-index: 99;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
        border-radius: 0;
    }

    .navbar-container {
        position: static;
    }
}

/* ===== SIDEBAR STYLES ===== */
.sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: linear-gradient(135deg, 
        var(--primary-color) 0%,
        var(--secondary-color) 50%,
        var(--accent-color) 100%
    );
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1000;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.sidebar.active {
    right: 0;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.1);
}

.sidebar-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid white;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.sidebar-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border-right: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: right 0.6s ease;
}

.sidebar-link:hover::before {
    right: 100%;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-right-color: white;
    transform: translateX(-5px);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.sidebar-link.active {
    background: rgba(255, 255, 255, 0.2);
    border-right-color: white;
    font-weight: 600;
}

.sidebar-link i {
    margin-left: 15px;
    font-size: 1.2rem;
    width: 25px;
    text-align: center;
    transition: transform 0.3s ease;
}

.sidebar-link:hover i {
    transform: scale(1.2) rotate(10deg);
}

.sidebar-link-text {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sidebar-link-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.sidebar-link-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
    font-style: italic;
}

.sidebar-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.sidebar-toggle.active {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    transform: rotate(180deg);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.user-info {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.1);
    margin-top: auto;
}

.user-welcome {
    color: white;
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-align: center;
}

.logout-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    text-align: center;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Animations */
@keyframes slideInRight {
    from {
        right: -300px;
        opacity: 0;
    }
    to {
        right: 0;
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        right: 0;
        opacity: 1;
    }
    to {
        right: -300px;
        opacity: 0;
    }
}

.sidebar-menu li {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.sidebar-menu li:nth-child(1) { animation-delay: 0.1s; }
.sidebar-menu li:nth-child(2) { animation-delay: 0.2s; }
.sidebar-menu li:nth-child(3) { animation-delay: 0.3s; }
.sidebar-menu li:nth-child(4) { animation-delay: 0.4s; }
.sidebar-menu li:nth-child(5) { animation-delay: 0.5s; }
.sidebar-menu li:nth-child(6) { animation-delay: 0.6s; }

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

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        right: -280px;
    }
    
    .sidebar-toggle {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        right: -100%;
    }
    
    .sidebar-link {
        padding: 12px 15px;
    }
    
    .sidebar-link-title {
        font-size: 0.9rem;
    }
    
    .sidebar-link-subtitle {
        font-size: 0.7rem;
    }
}

/* قسم المنصات */
.platforms-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.98) 100%);
    padding: 4rem 3rem;
    border-radius: 30px;
    box-shadow: 
        0 20px 60px rgba(27, 94, 32, 0.18),
        0 8px 20px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
    animation: sectionFadeIn 1s ease-out;
}

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

.platforms-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(27, 94, 32, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(255, 152, 0, 0.08) 0%, transparent 50%);
    animation: rotate 20s linear infinite reverse;
    z-index: 0;
}

.platforms-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shineMove 4s linear infinite;
    z-index: 0;
}

@keyframes shineMove {
    0% {
        transform: translateX(-100%) translateY(-100%);
    }
    100% {
        transform: translateX(100%) translateY(100%);
    }
}

.section-title {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    z-index: 2;
    animation: titleSlide 1s ease-out;
}

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

.section-title i {
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.section-description {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.15rem;
    position: relative;
    z-index: 2;
    animation: fadeInUp 1.2s ease-out;
}

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

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    width: 100%;
}

.platform-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    border-radius: 25px;
    padding: 2.5rem 2rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: cardFloat 6s ease-in-out infinite;
    animation-delay: calc(var(--card-index, 0) * 0.2s);
}

@keyframes cardFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) rotate(1deg);
    }
}

.platform-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, 
        rgba(27, 94, 32, 0.1) 0%,
        rgba(255, 152, 0, 0.1) 50%,
        rgba(27, 94, 32, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: rotate(0deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(0deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(360deg);
    }
}

.platform-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(27, 94, 32, 0.05) 0%,
        rgba(255, 152, 0, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 25px;
    z-index: 0;
}

.platform-card:hover::before {
    opacity: 0.3;
    animation: shimmer 2s infinite;
}

.platform-card:hover::after {
    opacity: 1;
}

.platform-card:hover {
    transform: translateY(-20px) scale(1.08) rotate(2deg);
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.2),
        0 15px 40px rgba(27, 94, 32, 0.25),
        0 0 0 4px rgba(255, 152, 0, 0.2),
        inset 0 2px 10px rgba(255, 255, 255, 0.8);
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(248, 249, 250, 1) 100%);
}

.platform-card:active {
    transform: translateY(-15px) scale(1.05) rotate(1deg);
}

.platform-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    color: white;
    margin-bottom: 1rem;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.2),
        inset 0 2px 5px rgba(255, 255, 255, 0.3);
    animation: iconPulse 3s ease-in-out infinite;
    animation-delay: calc(var(--card-index, 0) * 0.15s);
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            0 8px 20px rgba(0, 0, 0, 0.2),
            inset 0 2px 5px rgba(255, 255, 255, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 
            0 12px 30px rgba(0, 0, 0, 0.3),
            inset 0 2px 5px rgba(255, 255, 255, 0.4);
    }
}

.platform-icon.youtube {
    background: linear-gradient(135deg, #FF0000, #CC0000);
}

.platform-icon.instagram {
    background: linear-gradient(135deg, #E4405F, #C13584, #833AB4, #5851DB);
}

.platform-icon.tiktok {
    background: linear-gradient(135deg, #000000, #333333);
}

.platform-icon.facebook {
    background: linear-gradient(135deg, #1877F2, #0A5F9E);
}

.platform-card:hover .platform-icon {
    transform: scale(1.25) rotate(15deg) translateY(-5px);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.3),
        inset 0 3px 8px rgba(255, 255, 255, 0.4),
        0 0 30px rgba(255, 255, 255, 0.5);
    animation: iconSpin 0.6s ease-in-out;
}

@keyframes iconSpin {
    0% {
        transform: scale(1.1) rotate(0deg);
    }
    50% {
        transform: scale(1.3) rotate(180deg);
    }
    100% {
        transform: scale(1.25) rotate(15deg);
    }
}

.platform-card h3 {
    font-size: 1.6rem;
    margin: 0;
    color: var(--primary-color);
    font-weight: 700;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.platform-card:hover h3 {
    color: var(--accent-color);
    transform: scale(1.1);
    text-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

.platform-card p {
    color: #666;
    margin: 0;
    font-size: 1rem;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
    line-height: 1.6;
}

.platform-card:hover p {
    color: var(--primary-color);
    transform: translateY(-3px);
    font-weight: 600;
}

/* قسم تقصير الروابط */
.shorten-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.98) 100%);
    padding: 3rem;
    border-radius: 25px;
    box-shadow: 
        0 15px 50px rgba(27, 94, 32, 0.15),
        0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.shorten-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 152, 0, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.shorten-form {
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.input-wrapper {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.input-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 1.2rem;
    z-index: 2;
    pointer-events: none;
}

.input-url {
    width: 100%;
    padding: 18px 50px 18px 20px;
    border: 2px solid rgba(27, 94, 32, 0.2);
    border-radius: 15px;
    font-size: 1.1rem;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* السماح بالاختيار في حقول الإدخال فقط */
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.input-url:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 
        0 0 0 4px rgba(255, 152, 0, 0.1),
        0 8px 25px rgba(255, 152, 0, 0.15);
    transform: translateY(-2px);
}

.btn-shorten {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 18px 35px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(27, 94, 32, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.btn-shorten:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(27, 94, 32, 0.4);
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

.btn-shorten:active {
    transform: translateY(-1px);
}

.btn-shorten i {
    font-size: 1.2rem;
}

.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    animation: slideIn 0.3s ease;
}

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

.alert-success {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.1) 0%, rgba(81, 199, 132, 0.1) 100%);
    color: var(--secondary-color);
    border: 2px solid rgba(46, 125, 50, 0.3);
}

.alert-error {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1) 0%, rgba(239, 154, 154, 0.1) 100%);
    color: #c62828;
    border: 2px solid rgba(244, 67, 54, 0.3);
}

.alert i {
    font-size: 1.3rem;
}

.result-box {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.05) 0%, rgba(255, 183, 77, 0.05) 100%);
    padding: 25px;
    border-radius: 15px;
    border: 2px solid rgba(255, 152, 0, 0.2);
    margin-top: 1.5rem;
    animation: fadeInUp 0.5s ease;
}

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

.result-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.result-label i {
    color: var(--accent-color);
}

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

.result-input {
    flex: 1;
    min-width: 250px;
    padding: 15px 20px;
    border: 2px solid rgba(27, 94, 32, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    background: white;
    color: var(--text-color);
    direction: ltr;
    text-align: left;
    /* السماح بالاختيار في حقول الإدخال فقط */
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.result-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.1);
}

.btn-copy {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--orange-light) 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

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

/* تحسينات للشاشات المتوسطة */
@media (max-width: 1400px) {
    .container {
        max-width: 1400px;
        padding: 0 25px;
    }
    
    .platforms-grid {
        gap: 1.5rem;
    }
}

@media (max-width: 1200px) {
    .platforms-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* تحسينات خاصة بـ iOS و Safari */
@supports (-webkit-touch-callout: none) {
    body {
        /* إصلاح مشكلة التمرير في iOS */
        -webkit-overflow-scrolling: touch;
        position: relative;
    }
    
    /* إصلاح مشكلة input في iOS */
    input, textarea, select {
        -webkit-appearance: none;
        border-radius: 0;
    }
    
    /* إصلاح مشكلة zoom في iOS */
    input[type="text"],
    input[type="url"],
    input[type="email"],
    input[type="password"],
    textarea {
        font-size: 16px !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .platforms-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .platform-card {
        padding: 2rem 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-wrapper {
        min-width: 100%;
    }
    
    .btn-shorten {
        width: 100%;
        justify-content: center;
    }
    
    .result-content {
        flex-direction: column;
    }
    
    .result-input {
        min-width: 100%;
    }
    
    .btn-copy {
        width: 100%;
        justify-content: center;
    }
    
    .shorten-section {
        padding: 2rem 1.5rem;
    }
    
    .platforms-section {
        padding: 2.5rem 1.5rem;
    }
    
    /* تحسينات إضافية لـ iPhone */
    .header h1 {
        font-size: 2rem;
    }
    
    .header {
        padding: 30px 0;
    }
    
    /* إصلاح مشكلة اللمس في iOS */
    button, a, input, .btn {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        touch-action: manipulation;
    }
} 