* {
    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(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 40px 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-bottom: 30px;
    font-size: 1rem;
}

#promptInput {
    width: 100%;
    min-height: 200px;
    padding: 20px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

#promptInput:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
}

.generate-btn {
    width: 100%;
    padding: 16px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

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

.cards-container {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.prompt-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
}

.prompt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.prompt-card.used {
    background: #d4edda !important;
    border: 2px solid #28a745 !important;
}

.prompt-text {
    color: #333;
    line-height: 1.6;
    margin-bottom: 16px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.copy-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.copy-btn:hover {
    background: #5568d3;
}

.copy-btn.copied {
    background: #48bb78;
}

.copy-btn.copied::after {
    content: 'Copied!';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #48bb78;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.floating-controls {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.control-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

#undoBtn {
    background: #667eea;
    color: white;
}

#undoBtn:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.reset-btn {
    background: #dc3545;
    color: white;
}

.reset-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.toggle-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

#cardClickToggle {
    width: 50px;
    height: 26px;
    appearance: none;
    background: #ccc;
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

#cardClickToggle:checked {
    background: #667eea;
}

#cardClickToggle::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

#cardClickToggle:checked::before {
    transform: translateX(24px);
}

.prompt-card.clickable {
    cursor: pointer;
}

.prompt-card.clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 16px rgba(0, 0, 0, 0.2);
}
