:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --primary-color: #bb86fc;
    --primary-variant: #3700b3;
    --secondary-color: #03dac6;
    --text-main: #ffffff;
    --text-sec: #b0b0b0;
    --error-color: #cf6679;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-family);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    overscroll-behavior-y: none;
    /* Prevent pull-to-refresh on mobile */
}

.app-container {
    width: 100%;
    max-width: 480px;
    /* Mobile width constraint */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

header {
    margin-bottom: 40px;
    margin-top: 20px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-sec);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 5px;
}

/* State Views */
.state-view {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.state-view.active {
    display: flex;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Initial State */
.icon-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.animate-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

#initial-state p {
    color: var(--text-sec);
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    color: #000;
    padding: 16px 32px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    border: none;
    display: inline-block;
}

.btn-primary:active {
    transform: scale(0.95);
    background: #a370db;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    margin: 5px;
    cursor: pointer;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-sec);
    padding: 10px;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.9rem;
}

/* Result Card */
.result-card {
    background: var(--card-bg);
    width: 100%;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: left;
}

#result-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.content-box {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 10px;
    word-break: break-all;
    font-family: monospace;
    margin-bottom: 20px;
    color: var(--text-main);
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hidden {
    display: none;
}

#memo-section {
    margin-bottom: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

#memo-section h3 {
    margin-bottom: 10px;
    font-size: 1rem;
    color: var(--error-color);
    /* Secret warning color */
}

.actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

/* Loading */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.error-msg {
    color: var(--error-color);
    font-weight: bold;
    margin-bottom: 20px;
}

.privacy-notice {
    margin-top: 40px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--secondary-color);
    opacity: 0.9;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}