/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
    -webkit-touch-callout: none; /* Disable text selection callout */
    -webkit-user-select: none; /* Disable text selection */
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f0f23, #1a1a2e, #16213e);
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Allow text selection for input elements */
input, textarea, select {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* Prevent white flashes and performance issues */
html, body {
    background: #0f0f23; /* Consistent dark background */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Optimize hover effects globally */
button, .control-btn, .color-preset, .history-item {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Disable text selection highlighting that could cause white flashes */
::selection {
    background: rgba(0, 255, 136, 0.3);
    color: inherit;
}

::-moz-selection {
    background: rgba(0, 255, 136, 0.3);
    color: inherit;
}

/* App Container - Desktop First */
.app-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 20px;
    max-width: calc(100% - 320px);
    margin-right: 320px;
}

/* History Sidebar - Desktop: Right */
.history-sidebar {
    width: 320px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
}

/* Mobile Layout */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .main-content {
        max-width: 100%;
        margin-right: 0;
        padding: 10px;
    }
    
    .history-sidebar {
        width: 100%;
        position: static;
        height: auto;
        max-height: 300px;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-header h3 {
    color: #00ff88;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-content {
    padding: 20px;
}

/* Sidebar History Items */
.sidebar-content .history-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-content .history-item:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: #00ff88;
}

.sidebar-content .history-item-text {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-content .history-item-date {
    color: #888;
    font-size: 12px;
}

.sidebar-content .history-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.sidebar-content .history-action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    color: #fff;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-content .history-action-btn:hover {
    background: #00ff88;
    color: #000;
}

.sidebar-content .history-action-btn.delete:hover {
    background: #ff4757;
    color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #00ff88, #00ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.logo i {
    background: linear-gradient(45deg, #00ff88, #00ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.8;
    color: #cccccc;
}

/* LED Display Section */
.led-display-section {
    margin-bottom: 2rem;
}

.led-display-container {
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.led-display-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 204, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.led-display {
    background: #000000;
    border-radius: 15px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    position: relative;
    border: 3px solid #333;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(0, 255, 136, 0.2);
    /* Performance optimizations */
    will-change: background;
    contain: layout style paint;
    isolation: isolate;
    backface-visibility: hidden;
}

.scrolling-text {
    color: #00ff00;
    white-space: nowrap;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    transform: translateZ(0); /* Force hardware acceleration */
    display: flex;
    align-items: center;
    min-width: 100%; /* Ensure text has minimum width */
    /* Default font styles for non-pixel mode */
    font-family: 'Orbitron', monospace;
    font-size: 48px;
    font-weight: 700;
    text-shadow: none; /* No default glow */
}

/* Add back scroll animation for font mode */
@keyframes scroll-left {
    0% {
        transform: translateX(100%);
    }
    92% {
        transform: translateX(-100%);
    }
    92.1% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Pixel mode overrides */
.scrolling-text.pixel-mode {
    font-size: initial;
    font-weight: normal;
    font-family: inherit;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: calc(var(--cell-size, 6px) * var(--char-gap, 1.0)); /* Adjustable gap */
    padding: calc(var(--cell-size, 6px) * 0.5) 0;
    height: calc(var(--cell-size, 6px) * 8);
}

.pixel-char {
    display: grid;
    grid-template-rows: repeat(7, 1fr);
    grid-template-columns: repeat(5, 1fr);
    gap: calc(var(--cell-size, 6px) * 0.15);
    width: calc(var(--cell-size, 6px) * 5.5);
    height: calc(var(--cell-size, 6px) * 7.5);
    /* Performance optimization */
    will-change: auto;
    contain: layout style;
}

.pixel-row {
    display: contents;
}

.pixel-dot {
    width: var(--cell-size, 6px);
    height: var(--cell-size, 6px);
    border-radius: 50%;
    background: transparent; /* No background by default */
    box-shadow: none; /* Remove default shadow */
    transition: background 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
    will-change: background, box-shadow, opacity;
}

.pixel-dot.on {
    background: currentColor;
    box-shadow: none; /* No default glow */
    transition: background 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
    will-change: background, box-shadow, opacity;
}

/* Show background only for OFF pixels when glow is enabled */
/* Background effect removed - only glow effect remains */

/* Ensure ON pixels always use currentColor regardless of glow */
.scrolling-text.glow .pixel-dot.on {
    background: currentColor;
}

/* Glow & shadow integration for pixel dots - only affect ON pixels */
.scrolling-text.glow .pixel-dot.on {
    box-shadow: 
        0 0 calc(var(--glow-intensity,5) * 1px) currentColor,
        0 0 calc(var(--glow-intensity,5) * 2px) currentColor,
        0 0 calc(var(--glow-intensity,5) * 4px) currentColor,
        0 0 calc(var(--glow-intensity,5) * 6px) currentColor,
        0 0 calc(var(--glow-intensity,5) * 8px) currentColor;
    transition: box-shadow 0.1s ease;
    will-change: box-shadow;
}

.scrolling-text.shadow .pixel-dot.on {
    filter: drop-shadow(calc(var(--shadow-distance,3) * 2px) calc(var(--shadow-distance,3) * 2px) 0 var(--shadow-color, rgba(0,0,0,0.8))); /* Custom shadow color */
}

/* Blink effect in pixel mode - affects only ON pixels */
.scrolling-text.blink.pixel-mode .pixel-dot.on {
    animation: pixel-blink var(--blink-duration,1s) ease-in-out infinite alternate;
}

/* Background blink removed - only ON pixel blink remains */

@keyframes pixel-blink {
    0% { opacity: 1; }
    100% { opacity: 0.2; }
}

/* Background blink animation removed */

/* Blink effect for font mode */
.scrolling-text.blink:not(.pixel-mode) {
    animation: blink var(--blink-duration, 1s) ease-in-out infinite alternate;
}

@keyframes blink {
    0% { opacity: 1; }
    100% { opacity: 0.3; }
}

.scrolling-text.mirror {
    transform: scaleX(-1);
}

.scrolling-text.glow {
    text-shadow: 
        0 0 calc(var(--glow-intensity, 5) * 2px) currentColor,
        0 0 calc(var(--glow-intensity, 5) * 4px) currentColor,
        0 0 calc(var(--glow-intensity, 5) * 6px) currentColor,
        0 0 calc(var(--glow-intensity, 5) * 8px) currentColor,
        0 0 calc(var(--glow-intensity, 5) * 10px) currentColor,
        0 0 calc(var(--glow-intensity, 5) * 12px) currentColor;
}

.scrolling-text.shadow {
    text-shadow: 
        calc(var(--shadow-distance, 3) * 1px) calc(var(--shadow-distance, 3) * 1px) 0px rgba(0, 0, 0, 0.8),
        0 0 calc(var(--glow-intensity, 5) * 2px) currentColor,
        0 0 calc(var(--glow-intensity, 5) * 4px) currentColor,
        0 0 calc(var(--glow-intensity, 5) * 6px) currentColor,
        0 0 calc(var(--glow-intensity, 5) * 8px) currentColor;
}

.scrolling-text.glow.shadow {
    text-shadow: 
        calc(var(--shadow-distance, 3) * 1px) calc(var(--shadow-distance, 3) * 1px) 0px rgba(0, 0, 0, 0.8),
        0 0 calc(var(--glow-intensity, 5) * 2px) currentColor,
        0 0 calc(var(--glow-intensity, 5) * 4px) currentColor,
        0 0 calc(var(--glow-intensity, 5) * 6px) currentColor,
        0 0 calc(var(--glow-intensity, 5) * 8px) currentColor,
        0 0 calc(var(--glow-intensity, 5) * 10px) currentColor,
        0 0 calc(var(--glow-intensity, 5) * 12px) currentColor;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    /* Performance optimization for hover effects */
    contain: layout style;
}

.control-btn {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Performance optimizations */
    will-change: background, box-shadow;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.control-btn:hover {
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
}

.control-btn:active {
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.control-btn.active {
    background: linear-gradient(145deg, #00ff88, #00ccff);
    color: #000000;
}

/* Settings Panel */
.settings-panel {
    background: linear-gradient(145deg, #1e1e1e, #2a2a2a);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-group label {
    font-weight: 500;
    color: #cccccc;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.setting-group label i {
    color: #00ff88;
    width: 16px;
}

/* Form Controls */
input[type="text"], 
input[type="color"], 
textarea, 
select {
    background: #1a1a1a;
    border: 2px solid #333333;
    border-radius: 10px;
    color: #ffffff;
    padding: 0.75rem;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus, 
textarea:focus, 
select:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
    max-height: 150px;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #333333;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(145deg, #00ff88, #00ccff);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(145deg, #00ff88, #00ccff);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Color Input Group */
.color-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.color-input-group input[type="color"] {
    width: 60px;
    height: 40px;
    padding: 0;
    border-radius: 8px;
    cursor: pointer;
}

.color-input-group input[type="text"] {
    flex: 1;
    min-width: 100px;
}

/* Checkbox Styles */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400 !important;
    color: #ffffff !important;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: #1a1a1a;
    border: 2px solid #333333;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(145deg, #00ff88, #00ccff);
    border-color: #00ff88;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid #000000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Color Presets */
.preset-colors {
    grid-column: 1 / -1;
}

.color-presets {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.color-preset {
    width: 40px;
    height: 40px;
    border: 2px solid #333333;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.color-preset:nth-child(1) { background: linear-gradient(45deg, #00ff00 50%, #000000 50%); }
.color-preset:nth-child(2) { background: linear-gradient(45deg, #ff0000 50%, #000000 50%); }
.color-preset:nth-child(3) { background: linear-gradient(45deg, #0088ff 50%, #000000 50%); }
.color-preset:nth-child(4) { background: linear-gradient(45deg, #ffff00 50%, #000000 50%); }
.color-preset:nth-child(5) { background: linear-gradient(45deg, #ff8800 50%, #000000 50%); }
.color-preset:nth-child(6) { background: linear-gradient(45deg, #ff00ff 50%, #000000 50%); }
.color-preset:nth-child(7) { background: linear-gradient(45deg, #ffffff 50%, #1a1a1a 50%); }
.color-preset:nth-child(8) { background: linear-gradient(45deg, #000000 50%, #ffffff 50%); }

.color-preset:hover {
    border-color: #00ff88;
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

/* History Panel */
.history-panel {
    background: linear-gradient(145deg, #1e1e1e, #2a2a2a);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.history-header h3 {
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
}

.history-header h3 i {
    color: #00ff88;
}

.clear-btn {
    background: linear-gradient(145deg, #ff4757, #ff3742);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-btn:hover {
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

.history-list {
    display: grid;
    gap: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.history-item:hover {
    border-color: #00ff88;
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.1);
}

.history-item:active {
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.2);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.history-item-text {
    font-weight: 500;
    color: #ffffff;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item-date {
    font-size: 0.8rem;
    color: #888888;
}

.history-item-preview {
    background: #000000;
    border-radius: 6px;
    padding: 0.5rem;
    text-align: center;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    text-shadow: 0 0 5px currentColor;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.history-action-btn {
    background: #333333;
    border: none;
    color: #ffffff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.history-action-btn:hover {
    background: #555555;
}

.history-action-btn.delete {
    background: #ff4757;
}

.history-action-btn.delete:hover {
    background: #ff3742;
}

/* Footer */
.footer {
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer p {
    color: #cccccc;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-links a {
    color: #888888;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.social-links a:hover {
    color: #00ff88;
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.2);
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(145deg, #00ff88, #00ccff);
    color: #000000;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 255, 136, 0.3);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    font-weight: 500;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(145deg, #1e1e1e, #2a2a2a);
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    color: #ffffff;
    font-size: 1.3rem;
}

.close-btn {
    background: none;
    border: none;
    color: #888888;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: #ffffff;
}

.modal-body p {
    color: #cccccc;
    margin-bottom: 1rem;
}

.share-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.share-input-group input {
    flex: 1;
    background: #1a1a1a;
    border: 2px solid #333333;
    border-radius: 8px;
    color: #ffffff;
    padding: 0.75rem;
    font-family: monospace;
    font-size: 0.9rem;
}

.share-input-group button {
    background: linear-gradient(145deg, #00ff88, #00ccff);
    color: #000000;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.share-input-group button:hover {
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

.social-share {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.share-btn {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.whatsapp {
    background: #25d366;
}

.share-btn:hover {
    opacity: 0.9;
}

/* Fullscreen Mode */
.fullscreen-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: #000000 !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.fullscreen-mode .led-display {
    height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
}

.fullscreen-mode .scrolling-text {
    font-size: 8vw !important;
}

/* Responsive Design */
/* Mobile Optimizations */
@media (max-width: 768px) {
    .main-content {
        padding: 10px;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .controls {
        gap: 0.5rem;
        justify-content: center;
    }
    
    .control-btn {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .led-display {
        height: 100px;
    }
    
    .led-display-container {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .scrolling-text {
        font-size: 32px;
    }
    
    .sidebar-header {
        padding: 15px 20px;
    }
    
    .sidebar-content {
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .led-display-container {
        padding: 0.5rem;
    }
    
    .led-display {
        height: 80px;
    }
    
    .scrolling-text {
        font-size: 24px;
    }
    
    .settings-grid {
        gap: 0.5rem;
    }
    
    .setting-group {
        padding: 0.5rem;
    }
}
    
    .settings-panel,
    .history-panel {
        padding: 1rem;
    }
    
    .modal-content {
        padding: 1rem;
        margin: 20px;
    }
    
    .share-input-group {
        flex-direction: column;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        transform: translateX(100%);
    }
    
    .toast.show {
        transform: translateX(0);
    }

/* Custom Scrollbar */
.history-list::-webkit-scrollbar {
    width: 8px;
}

.history-list::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.setting-group,
.history-item {
    animation: fadeIn 0.3s ease-out;
}

/* Print Styles */
@media print {
    .controls,
    .settings-panel,
    .history-panel,
    .footer {
        display: none !important;
    }
    
    .led-display-container {
        background: white !important;
        box-shadow: none !important;
    }
    
    .led-display {
        border: 2px solid #000 !important;
    }
}
