* {
    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(90deg, #dac574 0.000%, #dac574 7.692%, #d9b656 calc(7.692% + 1px), #d9b656 15.385%, #d5a337 calc(15.385% + 1px), #d5a337 23.077%, #d08f17 calc(23.077% + 1px), #d08f17 30.769%, #c87900 calc(30.769% + 1px), #c87900 38.462%, #be6100 calc(38.462% + 1px), #be6100 46.154%, #b24800 calc(46.154% + 1px), #b24800 53.846%, #a52f00 calc(53.846% + 1px), #a52f00 61.538%, #961600 calc(61.538% + 1px), #961600 69.231%, #860000 calc(69.231% + 1px), #860000 76.923%, #740000 calc(74.615% + 1px), #740000 84.615%, #620000 calc(84.615% + 1px), #620000 92.308%, #500000 calc(92.308% + 1px) 100.000%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    padding-top: 40px;
}

.container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 500px;
    padding: 30px 25px;
    position: relative;
    perspective: 1000px;
}

/* Language Selector */
.language-selector {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    font-size: 24px;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.2s;
    z-index: 10;
}

.language-selector:hover {
    background: #f0f0f0;
}

.language-dropdown {
    position: absolute;
    top: 45px;
    right: 10px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
    overflow: hidden;
    min-width: 150px;
    z-index: 100;
}

.language-dropdown.show {
    display: block;
}

.language-option {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
    font-size: 14px;
}

.language-option:hover {
    background: #f5f5f5;
}

.language-option.active {
    background: #fce4ec;
    color: #e91e63;
    font-weight: 600;
}

.lang-flag {
    font-size: 18px;
}

h1 {
    text-align: center;
    color: #333;
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 600;
    padding-right: 40px;
    margin-top: 60px;
}

.description {
    text-align: center;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 25px;
    padding: 0 10px;
}

/* Toggle Switch */
.mode-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.mode-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s;
}

.mode-label.active {
    color: #333;
    font-weight: 600;
}

.switch {
    position: relative;
    width: 50px;
    height: 26px;
    background: #ddd;
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s;
}

.switch.on {
    background: #4CAF50;
}

.switch-handle {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.switch.on .switch-handle {
    transform: translateX(24px);
}

/* Flip Container - BIG for secret message */
.flip-container {
    position: relative;
    width: 100%;
    height: 200px;  /* BIGGER - for secret message */
    margin-bottom: 20px;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.flip-container.flipped {
    transform: rotateX(180deg);
}

.flip-front, .flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
}

/* Front - Input (BIG) */
.flip-front {
    z-index: 2;
    transform: rotateX(0deg);
}

.input-section textarea {
    width: 100%;
    height: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.3s, animation 0.5s;
}

.input-section textarea:focus {
    outline: none;
    border-color: #e91e63;
}

.input-section textarea.shake {
    animation: shake 0.5s;
    border-color: #f44336;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.input-label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Back - Clipboard (SAME BIG SIZE) */
.flip-back {
    transform: rotateX(180deg);
    background: #f5f5f5;
    border: 3px dashed #ccc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: visible;
}

.flip-back:hover {
    background: #eeeeee;
    border-color: #999;
}

.flip-back.copied {
    background: #c8e6c9;
    border-color: #4caf50;
    border-style: solid;
}

.clipboard-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.clipboard-text {
    font-size: 18px;
    font-weight: 600;
    color: #666;
}

.clipboard-text.copied {
    color: #2e7d32;
}

.clipboard-hint {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

#fireworks-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* Decode Mode Input */
.decode-input-section {
    display: none;
    margin-bottom: 20px;
}

.decode-mode .decode-input-section {
    display: block;
}

.decode-mode .flip-container {
    display: none;
}

.decode-input-section textarea {
    width: 100%;
    height: 150px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.3s;
}

.decode-input-section textarea:focus {
    outline: none;
    border-color: #e91e63;
}

/* Decode Output */
.decode-output {
    display: none;
    margin-bottom: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.decode-output.show {
    display: block;
}

.output-header {
    background: #f5f5f5;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.output-header span {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.copy-btn {
    background: #e91e63;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: #c2185b;
    transform: scale(1.05);
}

.copy-btn.copied {
    background: #4caf50;
}

.output-content {
    padding: 15px;
    min-height: 80px;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
}

/* Action Button */
.action-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #e91e63, #f06292);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(233, 30, 99, 0.3);
    margin-bottom: 15px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(233, 30, 99, 0.4);
}

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

.action-btn.clipboard-mode {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
}

.action-btn.clipboard-mode:hover {
    box-shadow: 0 6px 15px rgba(76, 175, 80, 0.4);
}

.action-btn.active {
    background: linear-gradient(135deg, #2196F3, #42A5F5);
    animation: pulse 0.5s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Messages */
.message {
    display: none;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.message.show {
    display: block;
}

.error-msg {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.success-msg {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

/* Selected Carrier Display */
.selected-display {
    display: none;
    text-align: center;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 10px;
    margin-bottom: 20px;
}

.decode-mode .selected-display {
    display: none !important;
}

.selected-display.has-selection {
    display: block;
}

.selected-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.selected-display.ready .selected-label {
    color: #4CAF50;
    font-weight: 600;
}

.selected-emoji {
    font-size: 48px;
}

/* Emoji Section */
.emoji-section {
    margin-bottom: 25px;
}

.decode-mode .emoji-section,
.decode-mode .letter-section {
    display: none;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 8px;
}

.emoji-btn {
    font-size: 32px;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-btn:hover {
    transform: scale(1.1);
    border-color: #e91e63;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.emoji-btn.selected {
    border-color: #e91e63;
    background: #fce4ec;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.2);
}

.emoji-btn.ready {
    border-color: #4CAF50;
    background: #e8f5e9;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

/* Letter Section */
.letter-section {
    margin-bottom: 25px;
}

.letter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    gap: 6px;
}

.letter-btn {
    font-size: 20px;
    font-weight: 600;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.letter-btn:hover {
    transform: scale(1.05);
    border-color: #e91e63;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.letter-btn.selected {
    border-color: #e91e63;
    background: #fce4ec;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.2);
}

.letter-btn.ready {
    border-color: #4CAF50;
    background: #e8f5e9;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

/* Footer Links */
.footer-links {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tutorial-link,
.github-link {
    text-align: center;
    color: #666;
    text-decoration: none;
    font-size: 13px;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.tutorial-link:hover,
.github-link:hover {
    background: #f5f5f5;
    color: #e91e63;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 25px 20px;
    }

    h1 {
        font-size: 20px;
    }

    .emoji-grid {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    }

    .emoji-btn {
        font-size: 28px;
        padding: 8px;
    }

    .letter-grid {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    }
}.logo {
    width: 250px;
    height: 200px;
    max-width: 250px;
    object-fit: contain;
    position: absolute;
    top: 15px;
    left: 15px;
}
.lang-ti * {
    font-family: 'Noto Serif Ethiopic', serif;
    font-weight: 400;  /* if not worked change it to 600 or 700 bold 900 */
}
