/* Modern Gaming Theme */
:root {
    --primary: #00ff88;
    --primary-dark: #00cc6a;
    --secondary: #00a8ff;
    --accent: #ff00ff;
    --success: #00ff88;
    --danger: #ff3860;
    --warning: #ffd166;
    --info: #00a8ff;
    --dark: #0a0e17;
    --darker: #070b14;
    --light: #f8f9fa;
    --gray: #6c757d;
    --light-gray: #1a1f2e;
    --border-radius: 8px;
    --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --neon-glow: 0 0 10px rgba(0, 255, 136, 0.6),
                 0 0 20px rgba(0, 255, 136, 0.4),
                 0 0 30px rgba(0, 255, 136, 0.2);
}

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

/* Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@400;500;600;700&display=swap');

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
}

body {
    font-family: 'Rajdhani', 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--light);
    background: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
}

/* Particles Background */
.particles {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--darker);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    color: var(--dark);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Game Header Styles */
.game-header {
    background: linear-gradient(180deg, rgba(10, 14, 23, 0.9) 0%, rgba(10, 14, 23, 0.7) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 255, 136, 0.2);
    position: relative;
    z-index: 10;
    width: 100%;
    overflow: hidden;
}

/* Footer Styles */
.game-footer {
    background: rgba(10, 14, 23, 0.95);
    color: var(--light);
    padding: 2.5rem 0;
    margin-top: 2.5rem;
    border-top: 1px solid rgba(0, 255, 136, 0.2);
    width: 100%;
    overflow: hidden;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 0 1.5rem;
}

.footer-widget {
    margin-bottom: 1.5rem;
}

.footer-widget h3 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-widget p,
.footer-widget a {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    display: block;
    transition: var(--transition);
}

.footer-widget a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Game Stats Styles */
.game-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
}

.game-stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 255, 136, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.game-stats i {
    color: var(--primary);
    font-size: 0.9rem;
}

.game-stats span:hover {
    background: rgba(0, 255, 136, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.1);
}

.header-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    position: relative;
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    font-size: 1.2rem;
    box-shadow: 0 0 15px var(--primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0, 255, 136, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}

.logo h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(90deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo span {
    color: var(--primary);
}

.main-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1;
    min-width: 100%;
    order: 1;
    margin-top: 1rem;
}

.main-nav.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.1rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, #00cc6a 100%);
    color: var(--dark);
    border: none;
    border-radius: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
    margin: 1.5rem 0;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.btn i {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.4);
    background: linear-gradient(135deg, #00ff88 0%, #00e676 100%);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(0, 255, 136, 0.3);
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    background: linear-gradient(135deg, #555 0%, #777 100%);
    color: #aaa;
}

.nav-link {
    color: var(--light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

.nav-link i {
    margin-right: 0.5rem;
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.header-bottom {
    padding: 3rem 0;
    text-align: center;
}

.header-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-content .subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Level Indicator */
.level-indicator {
    margin: 2rem auto 0;
    width: 100%;
    max-width: 400px;
}

.level-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    position: relative;
}

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

.level-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    position: relative;
    z-index: 1;
    transition: width 0.5s ease-out;
}

.level-indicator span {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
}

/* Game Footer Styles */
.game-footer {
    background: linear-gradient(180deg, rgba(10, 14, 23, 0.7) 0%, rgba(10, 14, 23, 0.9) 100%);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 255, 136, 0.1);
    padding: 4rem 0 0;
    position: relative;
    overflow: hidden;
}

.game-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    box-shadow: 0 0 10px var(--primary);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.footer-widget h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-widget p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--light);
    font-size: 1.1rem;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-link:hover {
    background: var(--primary);
    color: var(--dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.link-group h4 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--light);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 0.5rem;
}

.link-group h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

.link-group a {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 0.8rem;
    transition: var(--transition);
}

.link-group a i {
    margin-right: 0.5rem;
    color: var(--primary);
    font-size: 0.8rem;
    transition: var(--transition);
}

.link-group a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.link-group a:hover i {
    color: var(--primary);
}

.footer-bottom {
    margin-top: 4rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    margin: 0 0.5rem;
}

.footer-bottom a:hover {
    color: var(--primary);
    text-decoration: none;
}

.footer-bottom span {
    color: var(--primary);
    font-weight: 600;
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.game-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.game-stats i {
    color: var(--primary);
}

.main-header h1 {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 700;
    text-align: left;
    line-height: 1.2;
}

.main-header .subtitle {
    margin: 0.8rem 0 0;
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Converter Container */
.converter-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    margin: 2rem auto;
    max-width: 800px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.converter-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.converter-header {
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.converter-header h2 {
    margin: 0;
    color: var(--primary);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.converter-body {
    padding: 2rem;
}

/* Tabs */
.mode-tabs {
    display: flex;
    margin-bottom: 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mode-tab {
    flex: 1;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mode-tab i {
    font-size: 1.1em;
}

.mode-tab.active {
    background: var(--primary);
    color: var(--dark);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

.mode-tab:not(.active):hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

.tab-btn i {
    font-size: 1.1em;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
    background: white;
}

.tab-btn:not(.active):hover {
    background: rgba(0, 0, 0, 0.03);
}

/* Input Group */
.input-with-clear {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.clear-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0 5px;
    opacity: 0.6;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.clear-btn:hover {
    color: #ff4d4d;
    background-color: rgba(255, 77, 77, 0.1);
    opacity: 1;
}

.clear-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 150, 255, 0.3);
}

.input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary);
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-group label i {
    color: var(--primary);
    font-size: 1.1rem;
}

.input-field {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 8px;
    color: var(--light);
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.2),
                0 0 15px rgba(0, 255, 136, 0.1);
    background: rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

.input-wrapper {
    position: relative;
    display: flex;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.input-wrapper .input-field {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
    font-family: 'Rajdhani', sans-serif;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.btn-convert {
    padding: 0 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-convert:hover {
    background: var(--primary-dark);
    transform: none;
}

.accounting-result {
    text-align: right !important;
    direction: ltr;
    unicode-bidi: embed;
    justify-content: flex-end;
    padding-left: 2rem;
    position: relative;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.accounting-result::before {
    content: attr(data-currency);
    position: absolute;
    left: 0.8rem;
    color: #7f8c8d;
}

.negative {
    color: #e74c3c;
}

.negative-accounting {
    color: #e74c3c;
}

#result {
    flex-grow: 1;
    direction: ltr;
    text-align: left;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#copyBtn {
    background: none;
    border: none;
    font-size: 1.2rem;
    padding: 0.2rem 0.5rem;
    color: #7f8c8d;
    border-radius: 4px;
}

#copyBtn:hover {
    background: #ecf0f1;
    color: #2c3e50;
}

.examples {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.examples h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
    font-size: 1.2rem;
}

.example-group {
    margin-bottom: 1.5rem;
}

.example-group:last-child {
    margin-bottom: 0;
}

.example-group h4 {
    color: #3498db;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

.examples p {
    margin: 0.5rem 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    color: #2c3e50;
    display: flex;
    justify-content: space-between;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.examples p:before {
    content: '→';
    margin: 0 10px;
    color: #95a5a6;
}

/* Result Section */
.result-section {
    padding: 1.5rem 2rem 2rem;
}

.result-box {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 136, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.result-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
}

.result-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 255, 136, 0.3);
}

.result-box.success {
    animation: successPulse 1.5s ease-in-out;
}

@keyframes successPulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(0, 255, 136, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}

.result-box h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-box p {
    color: white;
    font-size: 1.2rem;
    margin: 0;
    word-break: break-word;
    line-height: 1.7;
    padding-right: 3rem;
    position: relative;
    min-height: 2.5rem;
}

.copy-btn {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.copy-btn:hover {
    background: var(--primary);
    color: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

.copy-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 255, 136, 0.3);
}

.copy-btn i {
    transition: transform 0.3s ease;
}

.copy-btn.copied {
    background: var(--primary);
    color: var(--dark);
}

.copy-btn.copied i::before {
    content: '\f00c';
}

/* RTL for Arabic text */
[lang="ar"],
.rtl,
#arabicNumber,
#arabicWords {
    direction: rtl;
    text-align: right;
    font-family: 'Tajawal', 'Segoe UI', system-ui, -apple-system, sans-serif;
    unicode-bidi: bidi-override;
}

/* Ensure numbers maintain proper RTL in Arabic */
.result-box span {
    unicode-bidi: plaintext;
    text-align: inherit;
}

/* Examples Section */
.examples {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.examples h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.examples h3::before {
    content: '\f05a';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 1.2em;
    color: var(--primary);
}

.example-group {
    margin-bottom: 1.5rem;
}

.example-group h4 {
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.example-group p {
    color: var(--gray);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.example-group p::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-stats {
        gap: 1rem;
        justify-content: center;
    }
    
    .game-stats span {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    /* Root variables */
    :root {
        --container-padding: 15px;
        --font-size-base: 15px;
        --input-padding: 12px;
    }
    
    /* Header adjustments */
    .header-top {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: 1rem;
    }
    
    .logo {
        width: 100%;
        justify-content: space-between;
        align-items: center;
    }
    
    .main-nav {
        width: 100%;
        justify-content: space-between;
        gap: 0.5rem;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .main-nav .nav-link {
        padding: 0.5rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    /* Footer adjustments */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }
    
    .footer-widget {
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    .footer-widget h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem;
    }
    
    /* Adjust header content */
    .header-content {
        text-align: center;
        padding: 1rem 0;
    }
    
    .header-content h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    body {
        padding: 10px;
        font-size: var(--font-size-base);
    }
    
    .converter-container {
        width: 100%;
        max-width: 100%;
        margin: 10px 0;
        padding: var(--container-padding);
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .converter-header h2 {
        font-size: 1.5rem;
        margin: 0 0 15px 0;
    }
    
    .mode-tabs {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .mode-tab {
        width: 100%;
        padding: 12px;
        font-size: 0.95rem;
        margin: 0;
    }
    
    .input-group {
        margin-bottom: 20px;
        width: 100%;
    }
    
    .input-field {
        padding: 12px;
        font-size: 1rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .input-with-clear {
        position: relative;
        width: 100%;
    }
    
    .clear-btn {
        right: 8px;
        width: 24px;
        height: 24px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .result-box {
        padding: 12px;
        margin-bottom: 15px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .result-box h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .result-box p {
        font-size: 1.1rem;
        padding: 12px;
        min-height: 44px;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
        position: relative;
    }
    
    .copy-btn {
        width: 32px;
        height: 32px;
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* Make sure buttons are touch-friendly */
    button {
        min-height: 44px;
        padding: 10px 15px;
    }
    
    /* Adjust header for mobile */
    header {
        padding: 15px 0;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    /* Ensure text doesn't overflow */
    #arabicNumberText,
    #englishWordsText,
    #arabicWordsText {
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        display: inline-block;
        padding-right: 40px; /* Space for copy button */
    }
    
    /* Adjust font sizes for better mobile readability */
    .input-group label {
        font-size: 0.95rem;
        margin-bottom: 8px;
        display: block;
    }
}

/* Extra small devices (phones, 480px and down) */
/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
    .game-stats {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .game-stats span {
        width: 100%;
        max-width: 220px;
        justify-content: center;
        padding: 0.5rem;
    }
    :root {
        --font-size-base: 14px;
        --container-padding: 12px;
        --input-padding: 10px;
    }
    
    .converter-header h2 {
        font-size: 1.3rem;
    }
    
    .result-box p {
        font-size: 1rem;
    }
    
    .copy-btn {
        width: 28px;
        height: 28px;
    }
    
    button {
        min-height: 44px;
        padding: 8px 12px;
        font-size: 0.95rem;
    }
    .input-field {
        padding: var(--input-padding);
        font-size: 1rem;
    }
    
    .input-with-clear {
        position: relative;
    }
    
    .clear-btn {
        right: 8px;
        width: 22px;
        height: 22px;
    }
    
    .result-box {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .result-box h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .result-box p {
        font-size: 1.1rem;
        padding: 10px;
        min-height: 44px;
    }
    
    .copy-btn {
        width: 30px;
        height: 30px;
    }
    
    /* Adjust header for mobile */
    header {
        padding: 15px 0;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    /* Ensure text doesn't overflow */
    #arabicNumberText,
    #englishWordsText,
    #arabicWordsText {
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        display: inline-block;
    }
    
    /* Adjust font sizes for better mobile readability */
    .input-group label {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }
    
    /* Make sure buttons are touch-friendly */
    button {
        min-height: 44px;
    }
    
    .btn-convert {
        padding: 0.75rem;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    
    .result-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .copy-btn {
        align-self: flex-end;
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }
    
    .converter {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .mode-tabs {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .mode-tab {
        width: 100%;
        padding: 10px;
        font-size: 0.95rem;
        margin: 0;
    }
    
    .input-group {
        margin-bottom: 20px;
    }
    
    .input-field {
        padding: var(--input-padding);
        font-size: 1rem;
    }
    
    .input-with-clear {
        position: relative;
    }
    
    .clear-btn {
        right: 8px;
        width: 22px;
        height: 22px;
    }
    
    .result-box {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .result-box h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .result-box p {
        font-size: 1.1rem;
        padding: 10px;
        min-height: 44px;
    }
    
    .copy-btn {
        width: 30px;
        height: 30px;
    }
    
    /* Adjust header for mobile */
    header {
        padding: 15px 0;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    /* Ensure text doesn't overflow */
    #arabicNumberText,
    #englishWordsText,
    #arabicWordsText {
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        display: inline-block;
    }
    
    /* Adjust font sizes for better mobile readability */
    .input-group label {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }
    
    /* Make sure buttons are touch-friendly */
    button {
        min-height: 44px;
    }
    
    .btn-convert {
        padding: 0.75rem;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    
    .result-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .copy-btn {
        align-self: flex-end;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --dark: #f8f9fa;
        --light: #212529;
        --light-gray: #343a40;
        --gray: #adb5bd;
    }
    
    body {
        background-color: #121212;
        color: #e9ecef;
    }
    
    .converter-card,
    .examples {
        background: #1e1e1e;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    
    .input-wrapper input {
        background: #2d2d2d;
        color: #f8f9fa;
        border-color: #495057;
    }
    
    .result-box {
        background: #2d2d2d;
        border-color: #495057;
    }
    
    .tab-btn {
        color: #adb5bd;
    }
    
    .tab-btn.active {
        background: #2d2d2d;
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }
    
    .converter {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
}
