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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(180deg, #cee0f5 0%, #92a6c9 100%);
    min-height: 100vh;
    padding: 2rem 1rem;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    color: rgb(54, 47, 47);
}

.title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: #1f2937;
    letter-spacing: 0.04em;
}

.description {
    font-size: 1.05rem;
    max-width: 700px;
    margin: 0 auto;
    color: #4b5563;
    line-height: 1.7;
}

.main-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin-bottom: 2rem;
}

.card-header {
    padding: 2rem 2rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.app-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.card-title {
    flex: 1;
}

.card-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.card-title p {
    font-size: 0.875rem;
    color: #6b7280;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toggle-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: 0.3s;
    border-radius: 12px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background-color: #3b82f6;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.btn-test {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 1rem;
}

.btn-test:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.text-area-container {
    padding: 0 2rem;
    margin-bottom: 1.5rem;
}

.text-input {
    width: 100%;
    min-height: 300px;
    padding: 1.5rem;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: #f9fafb;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
}

.text-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.text-input::placeholder {
    color: #9ca3af;
}

.preview-area {
    width: 100%;
    min-height: 300px;
    padding: 1.5rem;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: white;
    font-size: 1rem;
    line-height: 1.6;
    overflow-y: auto;
}

.preview-area h1, .preview-area h2, .preview-area h3 {
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.preview-area p {
    margin-bottom: 1rem;
}

.preview-area ul, .preview-area ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.preview-area code {
    background: #f3f4f6;
    padding: 0.125rem 0.25rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.preview-area pre {
    background: #f3f4f6;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.hidden {
    display: none !important;
}

.button-container {
    padding: 0 2rem 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-detect {
    background: #3b82f6;
    color: white;
}

.btn-detect:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-remove {
    background: #10b981;
    color: white;
}

.btn-remove:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-copy {
    background: #6b7280;
    color: white;
}

.btn-copy:hover:not(:disabled) {
    background: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.detection-results {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.detection-results h3 {
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.watermark-highlight {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    padding: 0.125rem 0.25rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.watermark-info {
    background: #f0f9ff;
    border: 1px solid #0284c7;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.watermark-list {
    list-style: none;
    padding: 0;
}

.watermark-list li {
    background: #f3f4f6;
    margin: 0.5rem 0;
    padding: 0.75rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}


/* ─── FOOTER ─── */
.site-footer {
    text-align: center;
    padding: 2rem 1rem 1rem;
    margin-top: 1rem;
}

.site-footer p {
    font-size: 0.82rem;
    color: #6b7280;
}

.site-footer a {
    color: #7444A4;
    text-decoration: none;
    font-weight: 600;
}

.site-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }

    .description {
        font-size: 1rem;
    }

    .card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }

    .toggle-container {
        justify-content: center;
        flex-wrap: wrap;
    }

    .btn-test {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .button-container {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }
}