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

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #f59e0b;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    padding: 40px 0 30px;
}

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

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

main {
    flex: 1;
}

.converter-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 40px;
}

.mode-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: var(--background);
    padding: 5px;
    border-radius: var(--radius);
}

.mode-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mode-btn.active {
    background: var(--card-bg);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.mode-btn:hover:not(.active) {
    color: var(--text-primary);
}

.input-section {
    margin-bottom: 20px;
}

.input-section label,
.output-section label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

#inputText {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

#inputText:focus {
    outline: none;
    border-color: var(--primary-color);
}

.style-section {
    margin-bottom: 25px;
}

.style-section label {
    display: block;
    font-weight: 500;
    margin-bottom: 10px;
}

.style-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.style-btn {
    padding: 10px 18px;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

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

.style-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.convert-btn {
    width: 100%;
    padding: 16px 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 25px;
}

.convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.convert-btn .arrow {
    font-size: 1.3rem;
}

.output-section {
    margin-bottom: 10px;
}

.output-container {
    position: relative;
}

.output-display {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    padding-right: 80px;
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1.2rem;
    word-break: break-word;
    color: var(--text-primary);
}

.output-display:empty::before {
    content: 'Your emoji result will appear here...';
    color: var(--text-secondary);
    font-size: 1rem;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 14px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

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

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

.notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success-color);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.notification.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
}

.info-section {
    margin-bottom: 40px;
}

.info-section h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--text-primary);
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.info-card {
    background: var(--card-bg);
    padding: 25px 20px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 15px;
}

.info-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.info-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

footer {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

/* Mobile Responsive */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }

    header {
        padding: 30px 0 20px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .converter-section {
        padding: 20px;
    }

    .mode-toggle {
        flex-direction: column;
    }

    .mode-btn {
        padding: 14px 20px;
    }

    .style-options {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .style-btn {
        padding: 12px 10px;
        font-size: 0.85rem;
    }

    .convert-btn {
        padding: 14px 20px;
        font-size: 1rem;
    }

    .output-display {
        font-size: 1.1rem;
        padding-right: 15px;
        padding-bottom: 50px;
    }

    .copy-btn {
        top: auto;
        bottom: 10px;
        right: 10px;
    }

    .info-cards {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .info-card {
        padding: 20px 15px;
    }

    .info-icon {
        font-size: 2rem;
    }
}

@media (max-width: 380px) {
    .info-cards {
        grid-template-columns: 1fr;
    }

    .style-options {
        grid-template-columns: 1fr;
    }
}
