/* ==========================================
   Reset & Base Styles
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Google Material Design Colors */
    --primary-blue: #4285f4;
    --primary-red: #ea4335;
    --primary-yellow: #fbbc04;
    --primary-green: #34a853;
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f4;
    --gray-200: #e8eaed;
    --gray-300: #dadce0;
    --gray-700: #5f6368;
    --gray-900: #202124;
    
    /* Shadows - Flatter design */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.08);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius - Flatter design */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-full: 9999px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    color: var(--gray-900);
    line-height: 1.6;
    position: relative;
    overflow: hidden;
}

/* ==========================================
   Background Shapes
   ========================================== */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    opacity: 0.06;
    animation: float 25s infinite ease-in-out;
}

.shape-1 {
    width: 200px;
    height: 200px;
    background: #4285f4;
    border-radius: 50%;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    background: #ea4335;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    top: 60%;
    right: 8%;
    animation-delay: 5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: #fbbc04;
    border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
    bottom: 15%;
    left: 15%;
    animation-delay: 10s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    background: #34a853;
    border-radius: 50%;
    top: 25%;
    right: 20%;
    animation-delay: 15s;
}

.shape-5 {
    width: 80px;
    height: 80px;
    background: #4285f4;
    border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%;
    bottom: 40%;
    left: 8%;
    animation-delay: 3s;
}

.shape-6 {
    width: 140px;
    height: 140px;
    background: #ea4335;
    border-radius: 50%;
    top: 5%;
    right: 10%;
    animation-delay: 8s;
}

.shape-7 {
    width: 90px;
    height: 90px;
    background: #34a853;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    bottom: 10%;
    right: 25%;
    animation-delay: 12s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(20px, -15px) scale(1.1);
    }
    66% {
        transform: translate(-15px, 20px) scale(0.95);
    }
}

/* ==========================================
   Container
   ========================================== */
.container {
    width: 100%;
    max-width: 900px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    padding: var(--spacing-xl);
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    z-index: 1;
}

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

/* ==========================================
   Header
   ========================================== */
.header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    letter-spacing: -0.02em;
}

.title-icon {
    width: 48px;
    height: 48px;
    /* animation: bounce 2s infinite; */
    vertical-align: middle;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.subtitle {
    font-size: 1.125rem;
    color: var(--gray-700);
    font-weight: 400;
    line-height: 1.6;
}

/* ==========================================
   Generator Section
   ========================================== */
.generator-section {
    margin-bottom: var(--spacing-lg);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.url-input {
    width: 100%;
    padding: 1.125rem 1.5rem;
    font-size: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    background: var(--white);
}

.url-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.08);
}

.url-input::placeholder {
    color: var(--gray-400);
    opacity: 0.2;
}

/* ==========================================
   Logo Upload Section
   ========================================== */
.logo-upload-section {
    position: relative;
}

.logo-label {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.75rem 1.5rem;
    background: var(--gray-100);
    color: var(--gray-900);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 2px dashed var(--gray-300);
}

.logo-label:hover {
    background: var(--gray-200);
    border-color: var(--primary-blue);
}

.logo-icon {
    font-size: 1.25rem;
}

.logo-input {
    display: none;
}

.logo-preview {
    margin-top: var(--spacing-sm);
    position: relative;
    display: inline-block;
}

.logo-preview img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    border: 2px solid var(--gray-300);
    padding: 0.5rem;
    background: var(--white);
}

.btn-remove-logo {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-remove-logo:hover {
    background: #c5221f;
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    font-family: inherit;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: none;
    width: 100%;
    font-size: 1.125rem;
    padding: 1.125rem 2rem;
}

.btn-primary:hover {
    background: #3367d6;
    box-shadow: var(--shadow-sm);
}

.btn-primary:active {
    background: #2952b3;
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-900);
    flex: 1;
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-accent {
    background: var(--primary-green);
    color: var(--white);
    flex: 1;
}

.btn-accent:hover {
    background: #2d8e3f;
    box-shadow: var(--shadow-sm);
}

.btn-link {
    background: transparent;
    color: var(--primary-blue);
    padding: 0.75rem 1.5rem;
    margin-top: var(--spacing-sm);
}

.btn-link:hover {
    background: var(--gray-100);
}

.btn-icon {
    font-size: 1.25rem;
}

/* ==========================================
   Error Message
   ========================================== */
.error-message {
    padding: 1rem;
    background: #fef2f2;
    color: var(--primary-red);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-md);
    border: 1px solid #fecaca;
    border-left: 3px solid var(--primary-red);
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ==========================================
   QR Code Container
   ========================================== */
.qrcode-container {
    animation: fadeIn 0.5s ease-out;
}

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

.qrcode-wrapper {
    display: flex;
    justify-content: center;
    padding: var(--spacing-lg);
    background: var(--gray-50);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.qrcode {
    background: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.qrcode canvas {
    display: block !important;
    margin: 0 auto;
    border-radius: var(--radius-sm);
}

.qrcode img {
    display: none !important;
}

/* ==========================================
   Actions
   ========================================== */
.actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-md);
}

/* ==========================================
   Share Link Container
   ========================================== */
.share-link-container {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-300);
    animation: slideDown 0.5s ease-out;
}

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

.share-link-label {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--spacing-sm);
}

.share-link-box {
    display: flex;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.share-link-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: var(--white);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.btn-copy {
    padding: 0.75rem 1.5rem;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: #3367d6;
}

.btn-copy:active {
    transform: scale(0.95);
}

/* ==========================================
   Links Section (友情链接)
   ========================================== */
.links-section {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-sm) 0;
}

.links-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.links-label {
    font-size: 0.8125rem;
    color: var(--gray-500);
    font-weight: 500;
}

.links-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.link-item {
    font-size: 0.8125rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 0.25rem 0.5rem;
}

.link-item:hover {
    color: var(--primary-blue);
}

.link-item:not(:last-child)::after {
    content: '|';
    margin-left: 0.5rem;
    color: var(--gray-300);
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--gray-200);
    color: var(--gray-700);
    font-size: 0.875rem;
}

/* ==========================================
   Responsive Design
   ========================================== */

/* Desktop large */
@media (min-width: 1200px) {
    .container {
        max-width: 1000px;
        padding: 3.5rem;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-lg);
        max-width: 500px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .title-icon {
        width: 40px;
        height: 40px;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .shape {
        opacity: 0.05;
    }
}

/* Mobile */
@media (max-width: 480px) {
    body {
        padding: var(--spacing-sm);
    }
    
    .container {
        padding: var(--spacing-lg);
        border-radius: var(--radius-md);
    }
    
    .header {
        margin-bottom: var(--spacing-lg);
    }
    
    .title {
        font-size: 1.875rem;
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .title-icon {
        width: 44px;
        height: 44px;
    }
    
    .subtitle {
        font-size: 0.9375rem;
    }
    
    .url-input {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }
    
    .btn-primary {
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }
    
    .logo-preview img {
        width: 64px;
        height: 64px;
    }
    
    .shape {
        opacity: 0.04;
    }

    .links-container {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ==========================================
   Utility Classes
   ========================================== */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: var(--spacing-sm);
}

.mb-1 {
    margin-bottom: var(--spacing-sm);
}

/* Success notification */
.success-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-green);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    animation: slideInRight 0.3s ease-out, fadeOut 0.3s ease-out 2.7s;
    z-index: 1000;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

