* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}



:root {
    --padding-mobile: 1rem;
    --padding-desktop: 3rem;
    --border-radius: 15px;
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --background-color: #1e293b;
    --container-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #475569;
}
.container111 {
    background: #ffffff;
    padding: var(--padding-mobile);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

h1 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.input-container1 {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.input-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.input-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

label {
    font-weight: bold;
    color: #34495e;
    font-size: 1rem;
}

input {
    padding: 0.875rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    width: 100%;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
}

button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 250px;
    position: relative;
    overflow: hidden;
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

button.loading {
    background: var(--primary-hover);
    cursor: wait;
}

.button-text {
    display: inline-block;
    transition: all 0.3s ease;
}

.loading-spinner {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

button.loading .button-text {
    opacity: 0;
}

button.loading .loading-spinner {
    display: block;
}

.result {
    margin-top: 2rem;
    text-align: center;
    display: none;
    padding: 0.5rem;
}

.result h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.ship-names-container {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.ship-names-category {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ship-names-category h3 {
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    font-size: 1.2rem;
    text-align: center;
}

.names-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.ship-name {
    padding: 0.875rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1rem;
    text-align: left;
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.875rem;
}

.name-text {
    flex: 1;
    word-break: break-word;
}

.copy-indicators {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 60px;
}

.copy-tooltip {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    opacity: 0;
    transition: all 0.2s ease;
    pointer-events: none;
    white-space: nowrap;
}

.copy-feedback {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: #27ae60;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.copy-icon, .check-icon {
    font-size: 0.875em;
}

.ship-name:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
}

.ship-name:hover .copy-tooltip {
    opacity: 1;
}

.ship-name.copied {
    background: #f1f9f5;
}

.ship-name.copied .copy-feedback {
    opacity: 1;
    animation: slideFeedback 1.5s ease forwards;
}

@keyframes slideFeedback {
    0% {
        opacity: 0;
        transform: translate(20px, -50%);
    }
    20% {
        opacity: 1;
        transform: translate(0, -50%);
    }
    70% {
        opacity: 1;
        transform: translate(0, -50%);
    }
    100% {
        opacity: 0;
        transform: translate(-20px, -50%);
    }
}

.ship-name:active {
    transform: scale(0.98);
}

.copy-feedback, .copy-tooltip {
    z-index: 1;
}

.ship-name:nth-child(1) { animation-delay: 0.1s; }
.ship-name:nth-child(2) { animation-delay: 0.2s; }
.ship-name:nth-child(3) { animation-delay: 0.3s; }
.ship-name:nth-child(4) { animation-delay: 0.4s; }
.ship-name:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Category-specific styles */
.ship-names-category:nth-child(1) {
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
}

.ship-names-category:nth-child(1) .ship-name {
    background: rgba(255, 255, 255, 0.95);
    color: #be185d;
}

.ship-names-category:nth-child(2) {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.ship-names-category:nth-child(2) .ship-name {
    background: rgba(255, 255, 255, 0.95);
    color: #1d4ed8;
}

.ship-names-category:nth-child(3) {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}

.ship-names-category:nth-child(3) .ship-name {
    background: rgba(255, 255, 255, 0.95);
    color: #15803d;
}

.bonus-category {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.bonus-category h3 {
    color: #ffffff;
}

.bonus-category .ship-name {
    background: rgba(255, 255, 255, 0.95);
    color: #b45309;
    font-weight: 500;
}

/* Responsive Design */
@media (min-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    button {
        width: auto;
    }
}

@media (min-width: 768px) {
    body {
        padding: 2rem;
    }

    .container {
        padding: var(--padding-desktop);
    }

    h1 {
        font-size: 2.2rem;
        margin-bottom: 2.5rem;
    }

    .input-row {
        flex-direction: row;
        gap: 2rem;
    }

    .input-group {
        max-width: 250px;
    }

    .ship-names-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    input, button {
        font-size: 1.1rem;
    }

    .ship-name {
        font-size: 1.1rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .copy-tooltip {
        display: none;
    }

    input, button, .ship-name {
        touch-action: manipulation;
    }

    .ship-name:hover {
        transform: none;
    }

    .ship-name:active {
        background: #f8f9fa;
    }
}
