:root {
    --bg-gradient-start: #0f172a;
    --bg-gradient-end: #1e1b4b;
    --card-bg: rgba(30, 41, 59, 0.6);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #818cf8;
    --accent-hover: #6366f1;
    --input-bg: rgba(15, 23, 42, 0.4);
    --input-border: rgba(255, 255, 255, 0.15);
    --input-focus: #818cf8;
    --success-color: #34d399;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    
    /* Anti-selection protection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.wrapper {
    max-width: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Header */
.header {
    text-align: center;
    animation: fadeInDown 0.8s ease-out;
}

.logo {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    border-radius: 16px;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    color: white;
}

.header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #e2e8f0, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
}

/* Main Card */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s ease-out;
}

.input-group,
.output-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Text Input */
textarea {
    width: 100%;
    min-height: 120px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.3s ease;
    
    /* Allow selection inside inputs */
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}

textarea:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.15);
}

textarea::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

/* Output Area */
.hash-container {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 0.5rem;
    transition: border-color 0.3s ease;
}

.hash-container:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.hash-display {
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    word-break: break-all;
    padding: 0.5rem 1rem;
    user-select: all;
}

/* Buttons */
.copy-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.copy-btn.copied {
    color: var(--success-color);
}

/* Feedback / Status message */
.status-message {
    min-height: 20px;
    font-size: 0.875rem;
    color: var(--success-color);
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.status-message.show {
    opacity: 1;
}

/* Footer */
.footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    opacity: 0.7;
    animation: fadeIn 1s ease-out 0.5s both;
}

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 480px) {
    .wrapper {
        gap: 1.5rem;
    }
    .header h1 {
        font-size: 1.5rem;
    }
    .card {
        padding: 1.5rem;
    }
    .hash-display {
        font-size: 0.8rem;
    }
}
