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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body.shell-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

body.tool-iframe-body {
    background: transparent;
    min-height: 100vh;
    padding: 0;
}

.shell {
    max-width: 1400px;
    margin: 0 auto;
}

.shell-topbar {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
    padding: 18px 22px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 16px;
}

.shell-brand {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shell-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.shell-subtitle {
    font-size: 13px;
    opacity: 0.9;
}

.shell-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
}

.shell-sidebar {
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 15px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    padding: 14px;
    height: calc(100vh - 20px - 16px - 76px);
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.shell-sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shell-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
}

.shell-nav-title {
    font-weight: 700;
    color: #333;
    font-size: 14px;
}

.shell-icon-btn {
    background: #4facfe;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.shell-icon-btn:hover {
    background: #00f2fe;
    transform: translateY(-1px);
}

.shell-api-section {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.shell-api-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}

.shell-api-item {
    background: white;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shell-api-item:hover {
    border-color: #4facfe;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.shell-api-item.active {
    border-color: #4facfe;
    background: rgba(79, 172, 254, 0.05);
}

.shell-api-item-title {
    font-weight: 700;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 68px;
}

.shell-api-item-method {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 4px;
    border-radius: 4px;
    width: fit-content;
}

.method-get { background: #e3f2fd; color: #1976d2; }
.method-post { background: #f1f8e9; color: #388e3c; }
.method-put { background: #fff3e0; color: #f57c00; }
.method-delete { background: #ffebee; color: #d32f2f; }

.shell-api-item-url {
    font-size: 11px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Courier New', monospace;
}

.shell-api-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #999;
    font-size: 12px;
    opacity: 0;
    transition: all 0.2s;
}

.shell-api-item:hover .shell-api-delete {
    opacity: 1;
}

.shell-api-delete:hover {
    background: #ffebee;
    color: #d32f2f;
}

.shell-api-copy {
    position: absolute;
    top: 8px;
    right: 32px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #999;
    font-size: 12px;
    opacity: 0;
    transition: all 0.2s;
}

.shell-api-item:hover .shell-api-copy {
    opacity: 1;
}

.shell-api-copy:hover {
    background: #e3f2fd;
    color: #1976d2;
}

.shell-api-empty {
    text-align: center;
    color: #999;
    font-size: 12px;
    padding: 20px 0;
}

.shell-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shell-nav-item {
    border: 1px solid rgba(0,0,0,0.08);
    background: #fff;
    border-radius: 12px;
    padding: 12px 12px;
    text-align: left;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.shell-nav-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(0,0,0,0.08);
    border-color: rgba(79, 172, 254, 0.45);
}

.shell-nav-item.active {
    border-color: rgba(79, 172, 254, 0.9);
    box-shadow: 0 10px 20px rgba(79, 172, 254, 0.18);
}

.shell-nav-item-title {
    font-weight: 800;
    color: #222;
    font-size: 14px;
}

.shell-nav-item-subtitle {
    color: #666;
    margin-top: 6px;
    font-size: 12px;
}

.shell-main {
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 15px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    height: calc(100vh - 20px - 16px - 76px);
}

.shell-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
}

.tool-page {
    padding: 18px 18px 26px;
}

.tool-page-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.tool-page-header h2 {
    margin: 0;
    font-size: 18px;
    color: #222;
}

.tool-page-desc {
    color: #666;
    font-size: 13px;
}

.tool-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tool-actions-hint {
    color: #666;
    font-size: 12px;
}

.tool-download-btn {
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 300;
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.content {
    padding: 30px;
}

.section {
    margin-bottom: 40px;
    padding: 25px;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    background: #fafafa;
}

.section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #4facfe;
    padding-bottom: 10px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.single-line-textarea {
    min-height: 40px;
    height: 40px;
    padding: 10px 12px;
    resize: none;
}

.textarea-wrap {
    position: relative;
}

.textarea-wrap textarea {
    padding-right: 95px;
}

.floating-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    opacity: 0;
    pointer-events: none;
}

.textarea-wrap:hover .floating-copy-btn,
.textarea-wrap:focus-within .floating-copy-btn {
    opacity: 1;
    pointer-events: auto;
}

.header-fav-btn {
    background: #ffffff;
    border: 1px solid #ddd;
    color: #666;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
    margin-left: 10px;
    white-space: nowrap;
}

.header-fav-btn:hover {
    border-color: #4facfe;
    color: #4facfe;
}

.header-fav-btn.active {
    border-color: #4facfe;
    background: rgba(79, 172, 254, 0.08);
    color: #4facfe;
}

.btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-right: 10px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

.copy-btn-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.copy-btn-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.copy-btn-modern:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.copy-btn-modern svg {
    flex-shrink: 0;
}

.cookie-list {
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
}

.cookie-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.cookie-item:hover {
    background-color: #f8f9fa;
}

.cookie-item:last-child {
    border-bottom: none;
}

.cookie-checkbox {
    margin-right: 12px;
    transform: scale(1.2);
}

.cookie-name {
    font-weight: 600;
    color: #333;
    margin-right: 10px;
    min-width: 150px;
}

.cookie-value {
    color: #666;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    flex: 1;
}

.result-area {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4facfe;
}

.result-area h3 {
    margin-bottom: 10px;
    color: #333;
}

.result-cookie {
    font-family: 'Courier New', monospace;
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #ddd;
    word-break: break-all;
    max-height: 200px;
    overflow-y: auto;
}

.compare-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.diff-item {
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
}

.diff-added {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
}

.diff-removed {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
}

.diff-modified {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

.diff-same {
    background-color: #f8f9fa;
    border-left: 4px solid #6c757d;
    opacity: 0.7;
}

.inclusion-summary {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 600;
    text-align: center;
}

.inclusion-summary.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.inclusion-summary.partial {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.inclusion-summary.failure {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.inclusion-details {
    margin-top: 15px;
}

.inclusion-item {
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    display: flex;
    align-items: center;
}

.inclusion-item .status-icon {
    margin-right: 10px;
    font-size: 16px;
}

.inclusion-found {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
}

.inclusion-missing {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
}

.inclusion-item.exact-match {
    background-color: #f8fff9;
}

.inclusion-item.value-mismatch {
    background-color: #fffaf0;
}

.inclusion-item.missing {
    background-color: #fff5f5;
}

.cookie-tabs {
    margin: 20px 0;
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 15px;
}

.tab-btn,
.headers-tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    margin-right: 5px;
}

.tab-btn:hover,
.headers-tab-btn:hover {
    color: #4facfe;
    background-color: #f8f9fa;
}

.tab-btn.active,
.headers-tab-btn.active {
    color: #4facfe;
    border-bottom-color: #4facfe;
    background-color: #f8f9fa;
}

.main-tabs {
    margin-bottom: 30px;
    border-bottom: 3px solid #f0f0f0;
}

.main-tab-buttons {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.main-tab-btn {
    background: none;
    border: none;
    padding: 15px 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    border-bottom: 4px solid transparent;
    transition: all 0.3s;
    border-radius: 8px 8px 0 0;
}

.main-tab-btn:hover {
    color: #4facfe;
    background-color: #f8f9fa;
}

.main-tab-btn.active {
    color: #4facfe;
    border-bottom-color: #4facfe;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.tab-content {
    animation: fadeIn 0.3s ease-in-out;
}

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

.stats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #4facfe;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .shell-layout {
        grid-template-columns: 1fr;
    }

    .shell-sidebar {
        height: auto;
        position: relative;
        top: auto;
    }

    .shell-main {
        height: 75vh;
    }

    .compare-section {
        grid-template-columns: 1fr;
    }
    
    .container {
        margin: 10px;
    }
    
    .content {
        padding: 20px;
    }
}
