:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-gradient: linear-gradient(135deg, #a78bfa 0%, #6366f1 100%);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.1) 0, transparent 50%),
        radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.1) 0, transparent 50%);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1100px;
    text-align: center;
}

header {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

h1 {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}

p.subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 500px;
}

.input-section {
    position: relative;
    max-width: 650px;
    margin: 0 auto 4rem;
}

input#stringInput {
    width: 100%;
    padding: 1.5rem 2rem;
    font-size: 1.4rem;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    color: white;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    outline: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--card-shadow);
}

input#stringInput:focus {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.15);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
    width: 100%;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
}

.char-preview {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-main);
    text-shadow: 0 0 20px rgba(167, 139, 250, 0.3);
}

.info-row {
    margin-top: 1rem;
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.75rem;
    transition: background 0.2s ease;
}

.info-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.info-row:active {
    background: rgba(255, 255, 255, 0.1);
}

.label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    color: var(--text-main);
    word-break: break-all;
}

.copy-hint {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.65rem;
    color: var(--primary);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.info-row:hover .copy-hint {
    opacity: 0.8;
}

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

.info-section {
    margin: 4rem auto 2rem;
    padding: 3rem;
    max-width: 800px;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    text-align: left;
}

.info-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.info-section h3 {
    color: var(--text-main);
    margin: 2rem 0 1rem;
    font-size: 1.25rem;
}

.info-section p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.info-section ul {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.info-section li {
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.5rem;
    border: 1px solid var(--glass-border);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.info-section li:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}


@media (max-width: 600px) {
    h1 { font-size: 2.5rem; }
    .logo-container { width: 90px; height: 90px; }
    .results-grid { grid-template-columns: 1fr; }
}
