@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Noto+Sans:wght@300;400;500;700&display=swap');

:root {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.7);
    --border-color: rgba(0, 0, 0, 0.1);
    --primary-color: #0ea5e9; /* Sky Blue */
    --accent-gradient: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    --glass-blur: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Browser Mockup Light */
    --browser-bg: #e2e8f0;
    --browser-header: #cbd5e1;
    --browser-tab-bg: #ffffff;
    --browser-tab-text: #475569;
    --browser-bookmarks-bg: #f1f5f9;
}

[data-theme="dark"] {
    --bg-color: #020617;
    --text-color: #f1f5f9;
    --card-bg: rgba(15, 23, 42, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);

    /* Browser Mockup Dark */
    --browser-bg: #0f172a;
    --browser-header: #1e293b;
    --browser-tab-bg: #334155;
    --browser-tab-text: #f1f5f9;
    --browser-bookmarks-bg: #1e293b;
}

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

body {
    font-family: 'Noto Sans TC', 'Noto Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.5s ease, color 0.5s ease;
    min-height: 100vh;
}

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

header {
    text-align: center;
    margin-bottom: 4rem;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.description {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* Upload Area */
.upload-wrapper {
    margin-bottom: 3rem;
}

.drop-zone {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    height: 200px;
    border: 2px dashed var(--border-color);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    cursor: pointer;
    transition: var(--transition);
}

.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--primary-color);
    background: rgba(14, 165, 233, 0.05);
}

.drop-zone i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 20px;
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
}

.control-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-toggle {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

input[type="color"] {
    -webkit-appearance: none;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: none;
    padding: 0;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: 2px solid var(--border-color);
    border-radius: 50%;
}

/* Previews Grid */
.previews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.preview-card {
    background: var(--card-bg);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    padding: 2rem;
    backdrop-filter: blur(var(--glass-blur));
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow);
}

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

.preview-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    opacity: 0.9;
}

.mockup-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    position: relative;
    border-radius: 12px;
    background: #fff; /* Individual card inner bg */
}

[data-theme="dark"] .mockup-container {
    background: #1e293b;
}

/* Specific Mockups */

/* Browser Mockups */
.browser-previews {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.browser-mockup {
    width: 100%;
    background: var(--browser-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.browser-header {
    height: 36px;
    background: var(--browser-header);
    display: flex;
    align-items: flex-end;
    padding: 0 10px;
    transition: var(--transition);
}

.browser-tab {
    background: var(--browser-tab-bg);
    height: 28px;
    padding: 0 12px;
    border-radius: 6px 6px 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--browser-tab-text);
    max-width: 150px;
    min-width: 34px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--transition);
}

.browser-tab.compressed {
    width: 34px;
    padding: 0;
    justify-content: center;
}

.browser-tab.compressed span {
    display: none;
}

.favicon-img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.logo-preview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.bookmarks-bar {
    height: 28px;
    background: var(--browser-bookmarks-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 15px;
    font-size: 11px;
    transition: var(--transition);
}

.bookmark-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #64748b;
}

/* Instagram Phone Mockup */
.phone-frame {
    width: 280px;
    height: 560px;
    background: #111;
    border-radius: 40px;
    padding: 12px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 4px solid #333;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.phone-header {
    height: 44px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-weight: bold;
    font-size: 14px;
    background: #fff;
    border-bottom: 1px solid #efefef;
}

.ig-post {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ig-post-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ig-avatar-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ig-avatar-wrapper.has-story {
    width: 42px;
    height: 42px;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-radius: 50%;
    padding: 2px;
}

.ig-avatar-wrapper.no-story {
    width: 42px;
    height: 42px;
}

.ig-avatar-inner {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 50%;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ig-post-img {
    width: 100%;
    aspect-ratio: 1/1;
    background: #f8fafc;
    border-radius: 4px;
}

/* LINE Chat Long */
.line-chat-preview {
    width: 100%;
    background: #7494C0;
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.line-msg {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.line-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    overflow: hidden;
    flex-shrink: 0;
}

.line-content-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.line-name {
    font-size: 11px;
    color: white;
    opacity: 0.9;
}

.line-bubble {
    background: white;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 14px;
    color: black;
    max-width: 250px;
}

.line-msg:first-child .line-bubble {
    border-top-left-radius: 0;
}

/* LINE Friend List */
.line-friend-list {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.line-friend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-bottom: 1px solid #f1f5f9;
}

.line-friend-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #e2e8f0;
    overflow: hidden;
    flex-shrink: 0;
}

.line-friend-info {
    display: flex;
    flex-direction: column;
}

.line-friend-name {
    font-size: 14px;
    font-weight: 500;
}

.line-friend-status {
    font-size: 11px;
    color: #94a3b8;
}

/* Discord Variations */
.discord-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
}

.discord-platform {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.discord-icon-container {
    padding: 1rem;
    background: #313338;
    border-radius: 12px;
}

.discord-icon {
    width: 48px;
    height: 48px;
    background: white;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.discord-icon.desktop {
    border-radius: 16px;
    transition: border-radius 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.discord-icon.desktop:hover {
    border-radius: 50%;
}

.discord-icon.mobile {
    border-radius: 50%;
}

/* Comparison & Safe Area */
.comparison-box {
    position: relative;
    width: 180px;
    height: 180px;
    background: white;
    border: 1px solid rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.safe-area-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    border: 2px dashed #ef4444;
    display: none;
    pointer-events: none;
}

.safe-area-overlay.visible {
    display: block;
}

/* Design Guidelines Section */
.guidelines-section {
    margin-top: 6rem;
    padding: 4rem 2rem;
    background: var(--card-bg);
    border-radius: 32px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(var(--glass-blur));
}

.guidelines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem 2rem;
    margin-top: 3rem;
    text-align: left;
}

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

.guideline-img {
    width: 100%;
    aspect-ratio: 16/9;
    background: #e2e8f0;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.guideline-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guideline-card p {
    font-size: 0.95rem;
    opacity: 0.8;
}


/* Footer */
footer {
    text-align: center;
    margin-top: 6rem;
    padding: 4rem 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.lang-switch {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.lang-switch a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

.lang-switch a:hover {
    color: var(--primary-color);
}

header .lang-switch {
    justify-content: center;
    margin-top: 0;
    margin-bottom: 2rem;
}

header .lang-switch a {
    background: var(--card-bg);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
}
