* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', 'Segoe UI', 'Arial', sans-serif;
    transition: all 0.3s ease;
}

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(145deg, #4a69bd, #3c5a9e);
    color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(74, 105, 189, 0.3);
}

header h1 {
    margin-bottom: 10px;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.code-container {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 40px;
}

.input-section, .output-section {
    flex: 1;
    min-width: 300px;
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.input-section:hover, .output-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

h2 {
    margin-bottom: 15px;
    color: #4a69bd;
    font-size: 1.5rem;
    font-weight: 600;
    position: relative;
    padding-right: 15px;
}

h2::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 20px;
    background-color: #4CAF50;
    border-radius: 5px;
}

textarea {
    width: 100%;
    height: 300px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    direction: ltr;
    text-align: left;
    background-color: #f8f9fa;
    transition: border 0.3s ease;
    line-height: 1.5;
    font-size: 15px;
}

textarea:focus {
    outline: none;
    border-color: #4a69bd;
    box-shadow: 0 0 0 3px rgba(74, 105, 189, 0.1);
}

textarea::placeholder {
    color: #aaa;
}

button {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 20px;
    background-color: #4a69bd;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button:hover {
    background-color: #3c5a9e;
    box-shadow: 0 5px 15px rgba(74, 105, 189, 0.3);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(74, 105, 189, 0.3);
}

button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 1s;
}

button:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

#copy-btn {
    background-color: #4CAF50;
}

#copy-btn:hover {
    background-color: #45a049;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

footer {
    text-align: center;
    padding: 25px;
    background-color: #343a40;
    color: white;
    margin-top: 50px;
    border-radius: 10px;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .code-container {
        flex-direction: column;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .language-selector select {
        width: 100%;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    textarea {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .mode-btn {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    button {
        padding: 12px;
    }
}

/* لمسات نهائية لتحسين تجربة المستخدم */
::selection {
    background-color: rgba(74, 105, 189, 0.2);
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 105, 189, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(74, 105, 189, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(74, 105, 189, 0);
    }
}

.mode-selector {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    position: relative;
    background-color: #f0f2f5;
    padding: 5px;
    border-radius: 50px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.mode-btn {
    padding: 12px 25px;
    margin: 0 5px;
    cursor: pointer;
    background-color: transparent;
    color: #555;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    outline: none;
    position: relative;
    z-index: 1;
}

.mode-btn.active {
    background-color: #4CAF50;
    color: white;
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.language-selector {
    text-align: center;
    margin-bottom: 30px;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.language-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #4a69bd;
    font-size: 1.1rem;
}

.language-selector select {
    padding: 12px 20px;
    border-radius: 50px;
    border: 1px solid #e0e0e0;
    background-color: white;
    font-size: 16px;
    width: 280px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a69bd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    background-size: 1em;
}

.language-selector select:focus {
    outline: none;
    border-color: #4a69bd;
    box-shadow: 0 0 0 3px rgba(74, 105, 189, 0.2);
}

.usage-section {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

ol {
    padding-right: 20px;
    margin-bottom: 20px;
}

li {
    margin-bottom: 10px;
}

.decoder-code {
    background-color: #f8f8f8;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
}

pre {
    background-color: #333;
    color: #f8f8f8;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: monospace;
    direction: ltr;
    text-align: left;
}

.instructions-section {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.method {
    margin-bottom: 25px;
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 5px;
}

.method h3 {
    color: #4CAF50;
    margin-bottom: 10px;
}

.method pre {
    background-color: #333;
    color: #f8f8f8;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-top: 15px;
    direction: ltr;
}

.method code {
    background-color: #eeeeee;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
}

.important-note {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 5px;
    padding: 15px;
    margin-top: 15px;
}

.important-note h4 {
    color: #856404;
    margin-bottom: 10px;
}

.important-note ul {
    padding-right: 20px;
    margin-bottom: 0;
}

.important-note li {
    margin-bottom: 5px;
    color: #856404;
}

.language-note {
    background-color: #e2f0fb;
    border: 1px solid #badcf6;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.language-note p {
    color: #3173a4;
    font-weight: bold;
    margin: 0;
}

.method.python, .method.php, .method.other {
    display: none;
}

.decryption-steps {
    background-color: #f3f3f3;
    padding: 15px 25px;
    border-radius: 5px;
    margin-top: 10px;
}

.decryption-steps li {
    margin-bottom: 8px;
    color: #333;
    list-style-type: square;
}

.tab-content {
    margin-top: 15px;
}

.tab {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.tab h3 {
    color: #4a69bd;
    margin-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.note {
    background-color: #e2f3f5;
    border-radius: 5px;
    padding: 10px 15px;
    margin-top: 15px;
    border-left: 4px solid #38a3a5;
}

.note p {
    margin: 0;
    color: #333;
    font-size: 14px;
} 