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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #8b4513;
    --accent-color: #d4af37;
    --gold-color: #F59E0B;
    --emerald-color: #059669;
    --text-dark: #2c3e50;
    --text-light: #5a6c7d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e1e8ed;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.16);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    padding: 1rem 0;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Navigation Bar Styles */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Mobile Menu Toggle - Hidden on Desktop */
.mobile-menu-toggle {
    display: none;
}

.mobile-menu-overlay {
    display: none;
}

.logo {
    display: inline-block;
}

.logo a {
    text-decoration: none;
    color: var(--primary-color);
}

.logo h1,
.logo span {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 600;
    display: inline-block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

/* Hero h1 and h2 styles are now in magic-styles.css with gradient effect */

.hero .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.generator-section {
    padding: 3rem 0;
}

.generator-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

/* Control Options */
.control-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.control-group input[type="color"] {
    width: 100%;
    height: 40px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
}

.control-group input[type="range"] {
    width: 100%;
}

.control-group select {
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

/* Font Display */
.fonts-display {
    margin-top: 3rem;
}

.fonts-display h2 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
}

.font-group {
    margin-bottom: 3rem;
}

.font-group h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

.font-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.font-item {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.font-item:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.font-preview {
    font-size: 24px;
    line-height: 1.4;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: white;
    border-radius: 4px;
    margin-bottom: 1rem;
    word-break: break-word;
    text-align: center;
}

.font-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    text-align: center;
}

.font-name a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.font-name a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.download-btn,
.copy-btn {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn {
    background: var(--primary-color);
    color: white;
}

.download-btn:hover {
    background: #34495e;
    transform: translateY(-1px);
}

.copy-btn {
    background: var(--accent-color);
    color: var(--primary-color);
}

.copy-btn:hover {
    background: #c4a137;
    transform: translateY(-1px);
}

.copy-btn.copied {
    background: #27ae60;
    color: white;
}

.input-section {
    margin-bottom: 2rem;
}

.input-section label,
.style-selector label,
.output-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

#textInput {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#textInput:focus {
    outline: none;
    border-color: var(--accent-color);
}

.style-selector {
    margin-bottom: 2rem;
}

.style-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.style-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: var(--bg-white);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.style-btn:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

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

.output-display {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    min-height: 120px;
    margin-bottom: 1.5rem;
}

#outputText {
    font-family: 'UnifrakturMaguntia', serif;
    font-size: 2rem;
    text-align: center;
    color: var(--text-dark);
    word-break: break-word;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-primary,
.btn-secondary {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background: #c4a137;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--primary-color);
    color: white;
}

.btn-secondary:hover {
    background: #34495e;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.info-section,
.features-section,
.how-it-works,
.use-cases-section,
.alphabet-showcase,
.history-preview,
.style-guide,
.tips-section,
.faq-section {
    padding: 4rem 0;
}

.info-section {
    background: var(--bg-white);
}

.info-section h2,
.features-section h2,
.how-it-works h2,
.use-cases h2,
.alphabet-showcase h2,
.history-preview h2,
.style-guide h2,
.tips-section h2,
.faq-section h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--primary-color);
}

.info-section p,
.how-it-works p,
.history-preview p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

/* How to Use Steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.step-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease;
}

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

.step-number {
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.step-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.step-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.cta-box {
    background: var(--bg-light);
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.cta-box p {
    margin-bottom: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.use-case-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.use-case-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-4px);
}

.use-case-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.alphabet-display {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: var(--shadow-sm);
}

.alphabet-row {
    margin-bottom: 2rem;
}

.alphabet-row h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.letters {
    font-size: 2rem;
    letter-spacing: 0.5rem;
    line-height: 2;
    word-break: break-all;
    color: var(--text-dark);
}

.style-examples {
    display: grid;
    gap: 2rem;
}

.style-example {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.style-example h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.sample-text {
    font-size: 2.5rem;
    margin: 1rem 0;
    text-align: center;
    color: var(--text-dark);
}

.sample-text.gothic {
    font-family: 'UnifrakturMaguntia', serif;
}

.sample-text.rotunda {
    font-family: 'Cinzel', serif;
    font-weight: 600;
}

.sample-text.fraktur {
    font-family: 'UnifrakturMaguntia', serif;
    letter-spacing: 2px;
}

.sample-text.schwabacher {
    font-family: 'Cinzel', serif;
    font-weight: 400;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.tip-card {
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
}

.tip-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.faq-item {
    background: var(--bg-white);
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.faq-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.faq-item p {
    color: var(--text-light);
    line-height: 1.6;
}

.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    color: white;
    margin-bottom: 1.5rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.2rem;
    background: var(--accent-color);
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-large:hover {
    background: #c4a137;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0 1rem;
}

/* Footer Styles */
.footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    font-family: 'Cinzel', serif;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Magic UI Share Button Styles with Ultrathink Design */
.share-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 99999 !important;
}

/* Share Trigger Button with Gradient */
.share-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--emerald-color), var(--gold-color));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(5, 150, 105, 0.4);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    z-index: 2;
    overflow: hidden;
}

/* Shimmer Effect */
.share-trigger::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s;
}

.share-trigger:hover::before {
    transform: rotate(45deg) translateX(100%);
}

.share-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(5, 150, 105, 0.5);
}

.share-trigger:active {
    transform: scale(0.95);
}

/* Icon Animations */
.share-trigger .icon-share,
.share-trigger .icon-close {
    position: absolute;
    color: white;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.share-trigger .icon-close {
    opacity: 0;
    transform: rotate(-180deg);
}

.share-fab.active .share-trigger .icon-share {
    opacity: 0;
    transform: rotate(180deg);
}

.share-fab.active .share-trigger .icon-close {
    opacity: 1;
    transform: rotate(0);
}

/* Share Options Container */
.share-options {
    position: absolute;
    bottom: 80px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.share-fab.active .share-options {
    pointer-events: auto;
    opacity: 1;
}

/* Individual Share Options */
.share-option {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    transform: translateY(20px) scale(0);
    opacity: 0;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

/* Glossy Overlay Effect */
.share-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.share-option:hover::before {
    opacity: 1;
}

/* Staggered Animation for Options */
.share-fab.active .share-option {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.share-fab.active .share-option:nth-child(1) {
    transition-delay: 0.05s;
}

.share-fab.active .share-option:nth-child(2) {
    transition-delay: 0.1s;
}

.share-fab.active .share-option:nth-child(3) {
    transition-delay: 0.15s;
}

.share-fab.active .share-option:nth-child(4) {
    transition-delay: 0.2s;
}

/* Platform-specific Styles */
.share-x {
    background: #000000;
}

.share-x:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.share-reddit {
    background: #FF4500;
}

.share-reddit:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 5px 20px rgba(255, 69, 0, 0.4);
}

.share-facebook {
    background: #1877F2;
}

.share-facebook:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 5px 20px rgba(24, 119, 242, 0.4);
}

.share-linkedin {
    background: #0A66C2;
}

.share-linkedin:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 5px 20px rgba(10, 102, 194, 0.4);
}

/* Pulse Animation */
@keyframes pulse-share {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(5, 150, 105, 0);
    }
}

.share-trigger {
    animation: pulse-share 2s infinite;
}

.share-fab.active .share-trigger {
    animation: none;
}

@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
        display: none;
    }
    
    /* Hero h1 and h2 responsive styles are handled in magic-styles.css */
    
    .style-buttons {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .use-cases-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid,
    .tips-grid {
        grid-template-columns: 1fr;
    }
}