:root {
    --primary: #8a3ab9; /* Instagram purple */
    --secondary: #e95950; /* Instagram red-orange */
    --accent: #bc2a8d; /* Instagram magenta */
    --yellow: #fccc63; /* Instagram yellow */
    --bg-dark: #0f0c29;
    --text-light: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --gradient: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: radial-gradient(circle at top right, #302b63, #24243e, #0f0c29);
    color: var(--text-light);
    min-height: 100vh;
    padding-top: 160px;
    overflow-x: hidden;
}

/* Navbar Style */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 1000;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
}

.nav-logo i {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    opacity: 0.8;
    transition: 0.3s;
}

.nav-link:hover {
    opacity: 1;
}


.background-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.3;
}

.shape1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary), transparent);
    top: -100px;
    left: -100px;
}

.shape2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--secondary), transparent);
    bottom: -100px;
    right: -100px;
}

.container {
    max-width: 1000px;
    width: 90%;
    margin: 0 auto;
    text-align: center;
    z-index: 10;
}

header {
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 2.5rem;
    font-weight: 800;
}

.logo h1 {
    font-size: 5rem;
    margin: 0;
    line-height: 1;
}


.logo i {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 3rem;
}

.logo h1.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradientMove 5s ease infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


.subtitle {
    margin-top: 10px;
    opacity: 0.7;
    font-weight: 300;
    letter-spacing: 1px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.main-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
}

/* input-interface styles from main page */
.input-interface {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    text-align: left;
    position: relative;
}

.interface-header {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 48px;
}

.tabs {
    display: flex;
    height: 100%;
}

.tab {
    padding: 0 24px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    border-right: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    transition: background 0.2s;
}

.tab.active {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    box-shadow: inset 0 -2px 0 var(--accent);
}

.actions {
    padding-right: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-indicator {
    font-size: 0.75rem;
    color: #10B981;
    display: flex;
    align-items: center;
    gap: 6px;
}

.count-indicator {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
}

.divider-v {
    width: 1px;
    height: 16px;
    background: var(--border-color);
}

.action-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: auto;
}

.action-btn:hover {
    color: #ff5e5e;
    background: rgba(244, 63, 94, 0.1);
}

.interface-body {
    padding: 0;
    display: flex;
    height: 250px;
    position: relative;
}

.line-numbers {
    width: 40px;
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.9rem;
    user-select: none;
    overflow: hidden;
}

.line-numbers span {
    line-height: 1.6;
    display: block;
    width: 100%;
    text-align: center;
}

.interface-body textarea {
    flex: 1;
    background: transparent;
    border: none;
    padding: 16px;
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: none;
    outline: none;
}

.interface-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings {
    display: flex;
    gap: 24px;
}

.feature-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.feature-indicator i {
    color: var(--accent);
    font-size: 0.9rem;
}

.btn-glow {
    background: var(--gradient);
    color: white;
    padding: 0.7rem 1.8rem;
    font-size: 0.95rem;
    font-weight: 600;
    gap: 8px;
    display: flex;
    align-items: center;
    box-shadow: 0 0 20px rgba(188, 42, 141, 0.3);
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(188, 42, 141, 0.5);
}


.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 1.5rem;
    position: relative;
}

input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px 20px;
    color: white;
    outline: none;
    transition: all 0.3s;
    font-size: 1rem;
}

input:focus {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 15px rgba(188, 42, 141, 0.2);
}

button {
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 10px 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 130px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

button:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

button:active {
    transform: scale(0.95);
}

.example {
    font-size: 0.85rem;
    opacity: 0.6;
}

.example a {
    color: var(--yellow);
    text-decoration: none;
}

.example a:hover {
    text-decoration: underline;
}

.hidden {
    display: none !important;
}

/* Result Card */
.result-card {
    animation: zoomIn 0.5s ease;
    text-align: left;
}

.result-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.media-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
}

.media-item-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease;
}

.media-item-container:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.media-preview-box {
    width: 100%;
    aspect-ratio: 1/1; /* 强制宫格图为正方形，看起来更整齐 */
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.media-preview-box img, .media-preview-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-preview img, .media-preview video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.media-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.media-info p {
    margin-bottom: 25px;
    opacity: 0.8;
    line-height: 1.6;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.gradient-btn {
    flex: 1;
    background: var(--gradient);
    color: white;
    text-decoration: none;
    padding: 15px 25px;
    border-radius: 12px;
    font-weight: 700;
    text-align: center;
    display: inline-block;
    transition: all 0.3s;
}

.secondary-btn {
    flex: 0.5;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 12px;
}

/* Batch partial-failure warning */
.batch-warn {
    grid-column: 1 / -1;   /* span full grid width */
    background: rgba(252, 204, 99, 0.08);
    border: 1px solid rgba(252, 204, 99, 0.3);
    padding: 12px 18px;
    border-radius: 10px;
    color: var(--yellow);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-msg {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    padding: 15px;
    border-radius: 12px;
    color: #ff5e5e;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.5s ease;
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.loader-inner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    display: none;
}

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

button.loading .btn-text,
button.loading i {
    display: none;
}

button.loading .loader-inner {
    display: block;
}

/* Trusted By Section */
.trusted-by {
    margin-top: 2rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.trusted-by span {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    font-weight: 600;
}

.trusted-by .logos {
    display: flex;
    gap: 3.5rem;
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.15);
    transition: color 0.3s;
}

.trusted-by .logos i {
    transition: color 0.3s ease;
}

.trusted-by .logos i:hover {
    color: rgba(255, 255, 255, 0.25);
}


main {
    padding-bottom: 80px;
}

footer {
    opacity: 0.4;
    font-size: 0.8rem;
    margin-top: 2rem;
    padding: 5rem 0 3rem 0;
    border: none;
    background: transparent;
    display: flex;
    justify-content: center;
    width: 100%;
    color: #fff;
}

.nav-actions {
    display: flex;
    align-items: center;
}

/* Language Switcher */
.lang-switch {
    position: relative;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: 0.2s;
    border: 1px solid transparent;
}

.lang-switch:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-color);
}

.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 140px;
    max-height: 320px;
    overflow-y: auto;
    background: #1a1a2e;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px;
    display: none;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    z-index: 100;
    margin-top: 8px;
}

.lang-menu.show {
    display: flex;
    animation: fadeIn 0.2s;
}

.lang-option {
    padding: 8px 12px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
}

.lang-option.active {
    color: var(--text-light);
    background: rgba(188, 42, 141, 0.3);
}

.flag-icon {
    width: 16px;
    height: 12px;
    border-radius: 2px;
    object-fit: cover;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
