.ai-content-studio * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.ai-content-studio {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    height: 100vh;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.5;
}

.ai-content-studio .title-bar {
    height: 38px;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e6e6ea;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    position: relative;
    z-index: 100;
}

.ai-content-studio .title {
    font-weight: 600;
    font-size: 13px;
    color: #1d1d1f;
    opacity: 0.9;
}

.ai-content-studio .container {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: calc(100vh - 38px);
}

.ai-content-studio .sidebar {
    width: 320px;
    background: #f0f0f2;
    border-right: 1px solid #e6e6ea;
    padding: 24px 20px;
    overflow-y: auto;
}

.ai-content-studio .logo {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1d1d1f;
}

.ai-content-studio .logo-icon {
    font-size: 28px;
    background: linear-gradient(135deg, #0071e3, #5e5ce0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ai-content-studio .nav-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: #e6e6ea;
    padding: 4px;
    border-radius: 8px;
}

.ai-content-studio .tab {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: #86868b;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.ai-content-studio .tab:hover {
    color: #1d1d1f;
}

.ai-content-studio .tab.active {
    background: white;
    color: #1d1d1f;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.ai-content-studio .settings-panel {
    background: white;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e6e6ea;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ai-content-studio .settings-panel h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1d1d1f;
}

.ai-content-studio .input-group {
    margin-bottom: 16px;
}

.ai-content-studio .input-group label {
    display: block;
    margin-bottom: 6px;
    color: #86868b;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ai-content-studio .input-group input,
.ai-content-studio .input-group select,
.ai-content-studio .input-group textarea {
    width: 100%;
    padding: 10px 12px;
    background: #f5f5f7;
    border: 1px solid #e6e6ea;
    border-radius: 8px;
    color: #1d1d1f;
    font-size: 13px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.ai-content-studio .input-group input:focus,
.ai-content-studio .input-group select:focus,
.ai-content-studio .input-group textarea:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0,113,227,0.2);
}

.ai-content-studio .btn-primary {
    width: 100%;
    padding: 12px 16px;
    background: #0071e3;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0,113,227,0.3);
}

.ai-content-studio .btn-primary:hover {
    background: #0077ed;
    transform: translateY(-1px);
}

.btn-secondary {
    padding: 8px 14px;
    background: #f5f5f7;
    border: 1px solid #e6e6ea;
    border-radius: 6px;
    color: #1d1d1f;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-secondary:hover {
    background: #e6e6ea;
}

.btn-small {
    padding: 4px 10px;
    background: #f5f5f7;
    border: 1px solid #e6e6ea;
    border-radius: 4px;
    color: #1d1d1f;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
}

.btn-small:hover {
    background: #0071e3;
    color: white;
    border-color: #0071e3;
}

.ai-content-studio .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-content-studio .results-toolbar {
    padding: 12px 20px;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e6e6ea;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.toolbar-btn {
    padding: 6px 14px;
    background: white;
    border: 1px solid #e6e6ea;
    border-radius: 20px;
    color: #1d1d1f;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.toolbar-btn:hover {
    background: #0071e3;
    color: white;
    border-color: #0071e3;
}

.ai-content-studio .results-area {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.welcome-message {
    text-align: center;
    padding: 60px 20px;
    color: #86868b;
    background: white;
    border-radius: 12px;
    border: 1px solid #e6e6ea;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.welcome-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.welcome-message h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1d1d1f;
}

.result-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #e6e6ea;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e6e6ea;
}

.result-number {
    font-weight: 600;
    font-size: 13px;
    color: #0071e3;
    background: rgba(0,113,227,0.1);
    padding: 4px 10px;
    border-radius: 16px;
}

.result-content {
    font-size: 13px;
    line-height: 1.7;
    color: #1d1d1f;
}

.loading {
    text-align: center;
    padding: 60px;
    color: #0071e3;
    font-size: 14px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e6e6ea;
}

.error {
    text-align: center;
    padding: 40px;
    color: #ff3b30;
    background: rgba(255,59,48,0.1);
    border-radius: 12px;
}

.history-panel {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e6e6ea;
    padding: 16px 20px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.history-list {
    overflow-y: auto;
    max-height: 140px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.history-item {
    padding: 10px 12px;
    background: white;
    border: 1px solid #e6e6ea;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.history-item:hover {
    background: #0071e3;
    border-color: #0071e3;
    color: white;
    transform: translateX(4px);
}

.api-info {
    margin-top: 20px;
    padding: 12px;
    background: #f5f5f7;
    border-radius: 8px;
    border: 1px solid #e6e6ea;
    display: flex;
    align-items: center;
    gap: 12px;
}

.api-status {
    width: 8px;
    height: 8px;
    background: #28cd41;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(40,205,65,0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(40,205,65,0.4); }
    70% { box-shadow: 0 0 0 6px rgba(40,205,65,0); }
    100% { box-shadow: 0 0 0 0 rgba(40,205,65,0); }
}

.api-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.api-label {
    font-size: 10px;
    color: #a1a1a6;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.api-value {
    font-size: 11px;
    color: #1d1d1f;
    font-weight: 500;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #c0c0c5;
    border-radius: 20px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: #86868b;
}