/* Unicode Converter Tool Styles */

/* Tool Container - Full Page Layout */
.unicode-converter-tool {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 0;
    margin: 0;
}

.tool-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
}

.tool-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: rgb(34, 33, 33);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.tool-header h1 i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.tool-description {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0;
    line-height: 1.6;
}

/* Converter Interface */
.converter-interface {
    margin-bottom: 3rem;
}

.converter-card {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    border: 1px solid #e5e7eb;
    
}

/* Input Section */
.input-section {
    margin-bottom: 2rem;
}

.input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-label i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: flex-start;
}

.text-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1.125rem;
    font-family: 'Courier New', monospace;
    color: var(--text-color);
    background-color: #ffffff;
    transition: all 0.2s ease-in-out;
    resize: vertical;
    min-height: 250px;
}

.text-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(50, 146, 109, 0.1);
}

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

.input-controls {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.25rem;
}

.control-btn {
    padding: 0.5rem;
    border: none;
    background: #f3f4f6;
    color: var(--text-light);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-size: 0.875rem;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.input-info {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    gap: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.info-item i {
    color: var(--primary-color);
    font-size: 0.75rem;
}

/* Format Options */
.format-options {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
}

.options-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.options-title i {
    color: var(--primary-color);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s ease-in-out;
}

.option-item:hover {
    background-color: rgba(50, 146, 109, 0.05);
}

.option-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.option-label {
    font-size: 0.875rem;
    color: var(--text-color);
    cursor: pointer;
    user-select: none;
}

/* Convert Button */
.convert-section {
    text-align: center;
    margin-bottom: 2rem;
}

.convert-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3aa179 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 200px;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(50, 146, 109, 0.3);
}

.convert-btn:active {
    transform: translateY(0);
}

.convert-btn i {
    font-size: 1.125rem;
}

/* Error Message */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.error-message i {
    color: #dc2626;
    font-size: 1.125rem;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Result Section */
.result-section {
    background: linear-gradient(135deg, #dcfce7 0%, #c9f4fc 100%);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border: 1px solid #86efac;
    animation: fadeInScale 0.5s ease-out;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.result-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.copy-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.copy-btn.copied {
    background: #059669;
}

.result-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.result-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.input-qualifier {
    font-size: 1rem;
    font-weight: 600;
    color: #059669;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.15) 100%);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    
}

.result-value-container {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease-in-out;
    line-height: 1;
    display: inline-block;
    word-break: break-all;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Result Formats */
.result-formats {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
    width: 100%;
}

.format-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.format-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

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

.format-label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.format-label i {
    color: #6b7280;
    font-size: 0.75rem;
}

.format-value {
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.875rem;
    word-break: break-all;
    text-align: right;
    max-width: 60%;
}

/* Character Details */
.character-details {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
}

.details-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.details-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.details-header i {
    color: var(--primary-color);
}

.details-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-item {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.detail-character {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
}

.detail-info {
    text-align: center;
}

.detail-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.detail-category {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Conversion Steps */
.conversion-steps {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
    animation: fadeInScale 0.5s ease-out;
}

.steps-header {
    margin-bottom: 1rem;
}

.steps-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.steps-header i {
    color: #3b82f6;
}

.steps-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.step-item {
    background: white;
    border-radius: 6px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease-in-out;
}

.step-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.step-number {
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-description {
    font-size: 0.875rem;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.step-calculation {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 500;
    word-break: break-all;
}

/* Examples Section */
.examples-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.examples-header {
    text-align: center;
    margin-bottom: 2rem;
}

.examples-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.examples-header h3 i {
    color: var(--primary-color);
}

.examples-header p {
    color: var(--text-light);
    font-size: 0.875rem;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.example-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.example-item:hover {
    background: #f0f9ff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(50, 146, 109, 0.15);
}

.example-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.example-input {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.example-output {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--text-light);
    word-break: break-all;
}

/* SEO Content */
.seo-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
}

.seo-content h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.seo-content h3 {
    color: var(--text-color);
    font-size: 1.25rem;
    margin: 1.5rem 0 1rem 0;
    font-weight: 600;
}

.seo-content p {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.seo-content ul, .seo-content ol {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.seo-content li {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tool-container {
        padding: 1rem;
    }

    .converter-card {
        padding: 1.5rem;
    }

    .tool-header h1 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .tool-header h1 i {
        font-size: 1.5rem;
    }

    .text-input {
        font-size: 1rem;
        padding: 0.875rem 2.5rem 0.875rem 0.875rem;
    }

    .result-value {
        font-size: 2rem;
    }

    .result-value-container {
        flex-direction: column;
        gap: 0.25rem;
    }

    .options-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }

    .format-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .format-value {
        max-width: 100%;
        text-align: left;
    }

    .details-content {
        grid-template-columns: 1fr;
    }

    .input-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .result-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .copy-btn {
        width: 100%;
        justify-content: center;
    }

    .step-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .step-number {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .tool-container {
        padding: 0.75rem;
    }

    .converter-card {
        padding: 1rem;
    }

    .tool-header h1 {
        font-size: 1.25rem;
    }

    .text-input {
        font-size: 0.875rem;
        padding: 0.75rem 2rem 0.75rem 0.75rem;
        min-height: 200px;
    }

    .result-value {
        font-size: 1rem;
        word-break: break-all;
    }

    .format-options {
        padding: 1rem;
    }

    .examples-section {
        padding: 1rem;
    }

    .seo-content {
        padding: 1rem;
    }

    .step-calculation {
        font-size: 0.75rem;
    }

    .example-input {
        font-size: 0.75rem;
    }

    .example-output {
        font-size: 0.7rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-input {
        border-width: 3px;
    }

    .text-input:focus {
        box-shadow: 0 0 0 4px rgba(50, 146, 109, 0.2);
    }

    .convert-btn {
        border: 2px solid transparent;
    }

    .convert-btn:focus {
        border-color: white;
    }
}

/* Print styles */
@media print {
    .unicode-converter-tool {
        background: white;
    }

    .converter-card,
    .examples-section,
    .seo-content {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .convert-btn,
    .copy-btn,
    .control-btn {
        display: none;
    }

    .loading-indicator {
        display: none;
    }
}
