.tool-page {
    padding-bottom: 3rem;
}

.tool-hero {
    background: var(--gradient-primary);
    padding: 2.5rem 0;
    color: white;
    text-align: center;
}

.tool-hero h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .tool-hero h1 { font-size: 2.25rem; }
}

.tool-hero p {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 500px;
    margin: 0 auto;
}

.tool-container {
    max-width: 900px;
    margin: -2rem auto 0;
    padding: 0 1rem;
    position: relative;
    z-index: 10;
}

.tool-main {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.tool-input-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) {
    .tool-input-section { padding: 2rem; }
}

.tool-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--foreground);
}

.tool-input {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--foreground);
    transition: all var(--transition);
    min-height: 100px;
    resize: vertical;
    font-family: var(--font-sans);
}

.tool-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.tool-input::placeholder {
    color: var(--muted);
}

.char-count {
    text-align: right;
    font-size: 0.8125rem;
    color: var(--muted);
    margin-top: 0.5rem;
}

.tool-output-section {
    padding: 1.5rem;
    background: var(--surface-secondary);
}

@media (min-width: 768px) {
    .tool-output-section { padding: 2rem; }
}

.output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.output-title {
    font-weight: 600;
    color: var(--foreground);
}

.output-actions {
    display: flex;
    gap: 0.5rem;
}

.results-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 500px;
    overflow-y: auto;
}

.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.result-item:hover {
    border-color: var(--primary);
}

.result-text {
    flex: 1;
    font-size: 1.125rem;
    word-break: break-all;
    line-height: 1.5;
}

.result-preview {
    font-size: 1.5rem;
    line-height: 1.3;
}

.copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    min-height: 36px;
}

.copy-btn:hover {
    background: var(--primary-hover);
}

.copy-btn.copied {
    background: var(--success);
}

.tool-options {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.option-label {
    font-size: 0.875rem;
    color: var(--foreground-secondary);
}

.option-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--foreground);
    font-size: 0.875rem;
    cursor: pointer;
}

.option-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.option-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.tool-info {
    margin-top: 2rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.tool-info h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--foreground);
}

.tool-info p {
    color: var(--foreground-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.tool-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: var(--foreground);
}

.tool-info ul {
    list-style: none;
    padding: 0;
}

.tool-info li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--foreground-secondary);
}

.tool-info li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

.related-tools {
    margin-top: 2rem;
}

.related-tools h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .related-tools-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
    .related-tools-grid { grid-template-columns: repeat(4, 1fr); }
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1rem;
}

.style-preview {
    padding: 1.25rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 2px solid var(--border);
    font-size: 1.25rem;
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-all;
    transition: all var(--transition);
}

.style-preview.brat {
    background: #8ACE00;
    color: #000;
    font-family: Arial Narrow, Arial, sans-serif;
    font-weight: bold;
    text-transform: lowercase;
    letter-spacing: -0.5px;
}

.style-preview.aesthetic {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    font-family: serif;
    letter-spacing: 3px;
}

.style-preview.vaporwave {
    background: linear-gradient(135deg, #ff6b9d 0%, #c44cd9 50%, #6e8efb 100%);
    color: white;
    font-weight: bold;
    letter-spacing: 8px;
}

.style-preview.kawaii {
    background: linear-gradient(135deg, #ffc0cb 0%, #ffb6c1 100%);
    color: #d63384;
}

.style-preview.neon {
    background: #0a0a0a;
    color: #0ff;
    text-shadow: 0 0 10px #0ff, 0 0 20px #0ff, 0 0 30px #0ff;
}

.style-preview.gothic {
    background: #1a1a1a;
    color: #8b0000;
    font-family: 'Times New Roman', serif;
}

.tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem;
    background: var(--surface-secondary);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow-x: auto;
}

.tab-btn {
    padding: 0.625rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground-secondary);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--foreground);
}

.tab-btn.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s infinite;
}

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--foreground);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success);
}
