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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    min-height: 100vh;
    height: 100vh;
    overflow: auto;
}

.menu {
    width: 100%;
    max-width: min(600px, calc(100vh - 280px));
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
    font-size: 14px;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.app-switcher {
    width: 100%;
    max-width: min(600px, calc(100vh - 280px));
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    flex-shrink: 0;
}

.app-switcher-btn {
    flex: 1;
    padding: 16px 24px;
    background-color: #f5f5f5;
    color: #333;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.app-switcher-btn:hover {
    background-color: #e8e8e8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.app-switcher-btn.active {
    background-color: #000000;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.app-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.style-selector {
    width: 100%;
    max-width: min(600px, calc(100vh - 280px));
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.style-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    letter-spacing: 0.3px;
}

.style-buttons {
    display: flex;
    gap: 12px;
    flex: 1;
}

.style-btn {
    flex: 1;
    padding: 12px 20px;
    background-color: #f5f5f5;
    color: #333;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.style-btn:hover {
    background-color: #e8e8e8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.style-btn.active {
    background-color: #000000;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.canvas-container {
    width: 100%;
    max-width: min(600px, calc(100vh - 280px));
    aspect-ratio: 1 / 1;
    background-color: #ffffff;
    border: 1px solid #000000;
    margin-bottom: 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.keyboard-selection {
    width: 100%;
    max-width: min(600px, calc(100vh - 280px));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    flex-shrink: 0;
}

.keyboard-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
}

.keyboard-btn {
    flex: 1;
    padding: 16px 24px;
    background-color: #f5f5f5;
    color: #333;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.keyboard-btn:hover {
    background-color: #e8e8e8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.keyboard-btn.active {
    background-color: #000000;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.input-container {
    width: 100%;
    max-width: min(600px, calc(100vh - 280px));
    text-align: center;
    flex-shrink: 0;
}

input[type="text"] {
    width: 100%;
    padding: 16px 20px;
    font-size: 18px;
    border: 1px solid #000000;
    background-color: #ffffff;
    text-align: center;
    letter-spacing: 2px;
    font-weight: 300;
    outline: none;
    transition: all 0.2s;
}

input[type="text"]:focus {
    border-width: 2px;
    padding: 15px 19px;
}

input[type="text"]::placeholder {
    color: #999;
    letter-spacing: 1px;
}

.info {
    margin-top: 20px;
    font-size: 12px;
    color: #666;
    letter-spacing: 0.5px;
}

.download-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 10px 16px;
    background-color: #000000;
    color: #ffffff;
    border: none;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.download-btn:hover:not(:disabled) {
    background-color: #333333;
    transform: translateY(-1px);
}

.download-btn:active:not(:disabled) {
    transform: translateY(0);
}

.download-btn:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
}

.map-scope-container {
    width: 100%;
    max-width: min(600px, calc(100vh - 280px));
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.map-scope-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    letter-spacing: 0.3px;
}

.map-scope-select {
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid #000000;
    background-color: #ffffff;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    letter-spacing: 0.3px;
    flex: 1;
    min-width: 150px;
}

.map-scope-select:focus {
    border-width: 2px;
    padding: 11px 15px;
}

.map-scope-input {
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid #000000;
    background-color: #ffffff;
    color: #333;
    border-radius: 4px;
    outline: none;
    transition: all 0.2s;
    letter-spacing: 0.3px;
    flex: 1;
    min-width: 150px;
}

.map-scope-input:focus {
    border-width: 2px;
    padding: 11px 15px;
}

.map-scope-input::placeholder {
    color: #999;
}

.city-list {
    width: 100%;
    max-width: min(600px, calc(100vh - 280px));
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 40px;
    flex-shrink: 0;
}

.city-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: #f5f5f5;
    border-radius: 4px;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.city-item-name {
    flex: 1;
    color: #333;
}

.city-item-remove {
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 0 8px;
    transition: color 0.2s;
}

.city-item-remove:hover {
    color: #333;
}

.city-input-container {
    width: 100%;
    max-width: min(600px, calc(100vh - 280px));
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    flex-shrink: 0;
}

#cityInput {
    flex: 1;
    padding: 16px 20px;
    font-size: 16px;
    border: 1px solid #000000;
    background-color: #ffffff;
    letter-spacing: 0.5px;
    font-weight: 300;
    outline: none;
    transition: all 0.2s;
}

#cityInput:focus {
    border-width: 2px;
    padding: 15px 19px;
}

#cityInput::placeholder {
    color: #999;
}

.enter-btn {
    padding: 16px 32px;
    background-color: #000000;
    color: #ffffff;
    border: none;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.enter-btn:hover:not(:disabled) {
    background-color: #333333;
}

.enter-btn:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
}

.city-info {
    width: 100%;
    max-width: min(600px, calc(100vh - 280px));
    font-size: 12px;
    color: #666;
    text-align: center;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.zodiac-selector {
    width: 100%;
    max-width: min(600px, calc(100vh - 280px));
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.zodiac-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    letter-spacing: 0.3px;
    text-align: center;
}

.zodiac-select {
    width: 100%;
    padding: 16px 20px;
    font-size: 15px;
    border: 1px solid #000000;
    background-color: #ffffff;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    letter-spacing: 0.3px;
    text-align: center;
}

.zodiac-select:focus {
    border-width: 2px;
    padding: 15px 19px;
}

/* Responsive styles */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .menu {
        margin-bottom: 15px;
        font-size: 12px;
        padding: 12px;
        max-width: min(600px, calc(100vh - 260px));
    }

    .app-switcher {
        margin-bottom: 25px;
        gap: 10px;
        max-width: min(600px, calc(100vh - 260px));
    }

    .app-switcher-btn {
        padding: 14px 20px;
        font-size: 14px;
    }

    .style-selector {
        margin-bottom: 15px;
        gap: 10px;
        max-width: min(600px, calc(100vh - 260px));
    }

    .style-label {
        font-size: 13px;
    }

    .style-buttons {
        gap: 10px;
    }

    .style-btn {
        padding: 11px 18px;
        font-size: 13px;
    }

    .canvas-container {
        margin-bottom: 15px;
        max-width: min(600px, calc(100vh - 260px));
    }

    .keyboard-selection {
        margin-bottom: 25px;
        gap: 16px;
        max-width: min(600px, calc(100vh - 260px));
    }

    .input-container {
        max-width: min(600px, calc(100vh - 260px));
    }

    .keyboard-buttons {
        gap: 10px;
    }

    .keyboard-btn {
        padding: 14px 20px;
        font-size: 14px;
    }

    input[type="text"] {
        font-size: 16px;
        padding: 14px 18px;
    }

    input[type="text"]:focus {
        padding: 13px 17px;
    }

    .download-btn {
        padding: 8px 12px;
        font-size: 11px;
        top: 8px;
        right: 8px;
    }

    .map-scope-container {
        margin-bottom: 15px;
        gap: 10px;
        max-width: min(600px, calc(100vh - 260px));
    }

    .map-scope-label {
        font-size: 13px;
    }

    .map-scope-select,
    .map-scope-input {
        font-size: 13px;
        padding: 11px 14px;
    }

    .map-scope-select:focus,
    .map-scope-input:focus {
        padding: 10px 13px;
    }

    .city-list {
        margin-bottom: 15px;
        max-width: min(600px, calc(100vh - 260px));
    }

    .city-input-container {
        margin-bottom: 12px;
        gap: 10px;
        max-width: min(600px, calc(100vh - 260px));
    }

    #cityInput {
        font-size: 15px;
        padding: 14px 18px;
    }

    #cityInput:focus {
        padding: 13px 17px;
    }

    .enter-btn {
        padding: 14px 28px;
        font-size: 14px;
    }

    .city-info {
        max-width: min(600px, calc(100vh - 260px));
    }

    .zodiac-selector {
        margin-bottom: 15px;
        gap: 10px;
        max-width: min(600px, calc(100vh - 260px));
    }

    .zodiac-label {
        font-size: 13px;
    }

    .zodiac-select {
        font-size: 14px;
        padding: 14px 18px;
    }

    .zodiac-select:focus {
        padding: 13px 17px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .menu {
        font-size: 11px;
        padding: 10px;
        margin-bottom: 10px;
        max-width: min(600px, calc(100vh - 240px));
    }

    .app-switcher {
        margin-bottom: 20px;
        gap: 8px;
        max-width: min(600px, calc(100vh - 240px));
    }

    .app-switcher-btn {
        padding: 12px 16px;
        font-size: 13px;
    }

    .style-selector {
        margin-bottom: 12px;
        gap: 8px;
        max-width: min(600px, calc(100vh - 240px));
    }

    .style-label {
        font-size: 12px;
    }

    .style-buttons {
        gap: 8px;
    }

    .style-btn {
        padding: 10px 16px;
        font-size: 12px;
    }

    .canvas-container {
        margin-bottom: 10px;
        max-width: min(600px, calc(100vh - 240px));
    }

    .keyboard-selection {
        margin-bottom: 20px;
        gap: 12px;
        max-width: min(600px, calc(100vh - 240px));
    }

    .input-container {
        max-width: min(600px, calc(100vh - 240px));
    }

    .keyboard-buttons {
        gap: 8px;
    }

    .keyboard-btn {
        padding: 12px 16px;
        font-size: 13px;
    }

    input[type="text"] {
        font-size: 14px;
    }

    .info {
        font-size: 11px;
    }

    .download-btn {
        padding: 6px 10px;
        font-size: 10px;
        top: 6px;
        right: 6px;
    }

    .map-scope-container {
        margin-bottom: 12px;
        gap: 8px;
        max-width: min(600px, calc(100vh - 240px));
    }

    .map-scope-label {
        font-size: 12px;
        width: 100%;
    }

    .map-scope-select,
    .map-scope-input {
        font-size: 12px;
        padding: 10px 12px;
        min-width: 120px;
    }

    .map-scope-select:focus,
    .map-scope-input:focus {
        padding: 9px 11px;
    }

    .city-list {
        margin-bottom: 12px;
        max-width: min(600px, calc(100vh - 240px));
    }

    .city-item {
        padding: 10px 14px;
        font-size: 13px;
    }

    .city-input-container {
        margin-bottom: 10px;
        gap: 8px;
        max-width: min(600px, calc(100vh - 240px));
    }

    #cityInput {
        font-size: 14px;
        padding: 12px 16px;
    }

    #cityInput:focus {
        padding: 11px 15px;
    }

    .enter-btn {
        padding: 12px 24px;
        font-size: 13px;
    }

    .city-info {
        font-size: 11px;
        max-width: min(600px, calc(100vh - 240px));
    }

    .zodiac-selector {
        margin-bottom: 12px;
        gap: 8px;
        max-width: min(600px, calc(100vh - 240px));
    }

    .zodiac-label {
        font-size: 12px;
    }

    .zodiac-select {
        font-size: 13px;
        padding: 12px 16px;
    }

    .zodiac-select:focus {
        padding: 11px 15px;
    }
}
