.font-changer {
    padding: 2rem 0;
    /* background-color: #f8f9fa; */
    min-height: 70vh;
    /* display: flex; */
    align-items: center;
    justify-content: center;
}

.tool-container {
    /* max-width: 1000px; */
    margin: 0 auto;
    background-color: #fff;
    border-radius: 12px;
    /* box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08); */
    overflow: hidden;
    /* padding: 2rem; */
}

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

.tool-header h2 {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.tool-header p {
    color: #666;
    font-size: 1.1rem;
}

.input-section {
    margin-bottom: 2rem;
}

.input-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

#input-text {
    width: 100%;
    height: 120px;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#input-text:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.options-section {
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .options-section {
        grid-template-columns: 1fr 1fr;
    }
    
    .special-fonts {
        grid-column: 1 / 3;
    }
}

.font-options h3, .style-options h3, .special-fonts h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.3rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 1rem;
}

.option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.5rem;
    border: 1px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.option-card:hover {
    border-color: #4a90e2;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.option-card.active {
    border-color: #4a90e2;
    background-color: rgba(74, 144, 226, 0.1);
}

.option-card[data-font="sans-serif"] .preview {
    font-family: Arial, sans-serif;
}

.option-card[data-font="serif"] .preview {
    font-family: Georgia, serif;
}

.option-card[data-font="monospace"] .preview {
    font-family: "Courier New", monospace;
}

.option-card[data-font="cursive"] .preview {
    font-family: cursive;
}

.option-card[data-font="fantasy"] .preview {
    font-family: fantasy;
}

.option-card[data-font="system-ui"] .preview {
    font-family: system-ui;
}

.option-card[data-font="comic-sans"] .preview {
    font-family: "Comic Sans MS", cursive, sans-serif;
}

.option-card[data-font="impact"] .preview {
    font-family: Impact, Charcoal, sans-serif;
}

.option-card[data-font="trebuchet"] .preview {
    font-family: "Trebuchet MS", Helvetica, sans-serif;
}

.option-card[data-font="verdana"] .preview {
    font-family: Verdana, Geneva, sans-serif;
}

.option-card[data-font="palatino"] .preview {
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
}

.option-card[data-font="tahoma"] .preview {
    font-family: Tahoma, Geneva, sans-serif;
}

.option-card[data-font="times"] .preview {
    font-family: "Times New Roman", Times, serif;
}

.option-card[data-font="courier"] .preview {
    font-family: "Courier New", Courier, monospace;
}

.option-card[data-font="lucida"] .preview {
    font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
}

.option-card[data-font="gill-sans"] .preview {
    font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
}

.option-card[data-font="garamond"] .preview {
    font-family: Garamond, serif;
}

.option-card[data-font="brush-script"] .preview {
    font-family: "Brush Script MT", cursive;
}

.preview {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.option-name {
    font-size: 0.8rem;
    text-align: center;
}

.style-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.slider-group {
    display: flex;
    flex-direction: column;
}

.slider-group label {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

input[type="range"] {
    width: 100%;
    cursor: pointer;
}

.formatting-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
}

.format-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.format-btn:hover {
    background-color: #f5f5f5;
    border-color: #bbb;
}

.format-btn.active {
    background-color: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

.format-icon {
    font-style: normal;
    font-weight: bold;
}

.italic-icon {
    font-style: italic;
}

.underline-icon {
    text-decoration: underline;
}

.color-picker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-picker label {
    font-size: 0.9rem;
}

input[type="color"] {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.special-fonts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.special-font-btn {
    padding: 0.8rem 0.5rem;
    border: 1px solid #eee;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.special-font-btn:hover {
    border-color: #4a90e2;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.output-section {
    background-color: #f9f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
}

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

.output-header h3 {
    margin: 0;
    color: #333;
}

.action-buttons {
    display: flex;
    gap: 0.8rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border: none;
    background-color: #4a90e2;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.action-btn:hover {
    background-color: #3a7bc8;
}

.btn-success {
    background-color: #1bb55ee8;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s;
  }
  
  .btn-success:hover {
    background-color: #1b944fe8;
  }
  

#btn-reset {
    background-color: #f1f1f1;
    color: #333;
}

#btn-reset:hover {
    background-color: #e5e5e5;
}

.btn-icon {
    font-size: 1rem;
}

.output-display {
    min-height: 100px;
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    border: 1px solid #eee;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
}

.copy-notification {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
    font-size: 0.9rem;
}

.copy-notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    content: '✔ Copied!';
}

@media (max-width: 767px) {
    .tool-container {
        /* padding: 1.5rem; */
    }
    
    .output-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .action-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .formatting-controls {
        justify-content: center;
    }
    
    .special-fonts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}