:root {
    --bg-color: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #8b5cf6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --success: #10b981;
    --error: #ef4444;
}

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

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: float 20s infinite alternate ease-in-out;
}

.glow-1 {
    top: -10%;
    right: -10%;
    background: var(--primary);
}

.glow-2 {
    bottom: -10%;
    left: -10%;
    background: var(--accent);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.2); }
}

/* Main Container */
.container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo .icon {
    font-size: 2.5rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Glass Panel */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.5);
    padding: 0.5rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

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

/* Inputs & Forms */
.input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-weight: 500;
}

input {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.action-btn {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
}

.action-btn.primary:hover {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

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

/* Results */
.result-box {
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 500;
    display: none;
    background: rgba(15, 23, 42, 0.6);
}

.result-box.success {
    display: block;
    border: 1px solid var(--success);
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.result-box.error {
    display: block;
    border: 1px solid var(--error);
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.result-area {
    width: 100%;
    height: 150px;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    color: var(--text-main);
    font-family: monospace;
    font-size: 1.1rem;
    resize: none;
    margin-top: 0.5rem;
}

.result-area::-webkit-scrollbar {
    width: 8px;
}
.result-area::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}

.result-actions {
    display: flex;
    justify-content: flex-end;
}

.icon-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    cursor: pointer;
    transition: color 0.3s;
}

.icon-btn:hover {
    color: var(--primary);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.footer-bot {
    margin-bottom: 0.5rem;
}

.bot-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
    text-decoration: none;
    background: rgba(59, 130, 246, 0.15);
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.bot-link:hover {
    background: rgba(59, 130, 246, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.bot-link svg {
    color: var(--primary);
}

.footer-credits {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.footer-credits a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

/* Toast */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-main);
    color: var(--bg-color);
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-weight: 600;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
    transition: bottom 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
}

.toast.show {
    bottom: 30px;
}
