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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.header {
    text-align: center;
    padding: 30px 0;
}

.header h1 {
    color: #fff;
    font-size: 32px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.main {
    background: #fff;
    border-radius: 20px;
    padding: 30px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.mode-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.mode-btn {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #667eea;
    background: #fff;
    color: #667eea;
    border-radius: 15px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
}

.mode-btn:hover {
    transform: scale(1.02);
}

.type-selectors {
    margin-bottom: 30px;
}

.type-selector {
    text-align: center;
    position: relative;
}

.type-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.type-select {
    width: 100%;
    padding: 14px 40px 14px 20px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.truth-select {
    border: 2px solid #667eea;
    color: #667eea;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
}

.truth-select:hover {
    border-color: #764ba2;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.truth-select:focus {
    border-color: #764ba2;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.dare-select {
    border: 2px solid #f093fb;
    color: #f093fb;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f093fb' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
}

.dare-select:hover {
    border-color: #f5576c;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.dare-select:focus {
    border-color: #f5576c;
    box-shadow: 0 4px 20px rgba(240, 147, 251, 0.4);
}

.type-select option {
    padding: 12px;
    font-size: 16px;
    color: #333;
    background: #fff;
}

.scroll-display {
    text-align: center;
    margin-bottom: 30px;
}

.scroll-box {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    height: 200px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
}

.scroll-content {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    padding: 20px;
    text-align: center;
    line-height: 1.5;
}

.start-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 15px 50px;
    font-size: 18px;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

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

.admin-btn-wrapper {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.admin-btn {
    flex: 1;
    max-width: 140px;
    background: transparent;
    color: #999;
    border: 1px solid #ddd;
    padding: 10px 15px;
    font-size: 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.admin-btn:hover {
    color: #667eea;
    border-color: #667eea;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
}

.modal-content h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.modal-content input,
.modal-content textarea,
.modal-content select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 20px;
    outline: none;
}

.modal-content textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
}

.modal-buttons {
    display: flex;
    gap: 15px;
}

.cancel-btn,
.confirm-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.cancel-btn {
    background: #f5f5f5;
    color: #666;
}

.cancel-btn:hover {
    background: #e0e0e0;
}

.confirm-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.confirm-btn:hover {
    opacity: 0.9;
}

.bank-modal {
    padding: 20px;
}

.bank-content {
    width: 100%;
    max-width: 800px;
    height: 80vh;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.bank-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.bank-filter {
    display: flex;
    gap: 15px;
    flex: 1;
}

.bank-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bank-filter-item label {
    font-size: 14px;
    color: #666;
}

.bank-filter-item select {
    width: auto;
    min-width: 100px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 0;
    background: #fff;
}

.bank-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.close-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.bank-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f5f5f5;
}

.waterfall {
    column-count: 2;
    column-gap: 15px;
}

.waterfall-item {
    break-inside: avoid;
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.waterfall-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #fff;
    margin-bottom: 8px;
}

.waterfall-tag.truth {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.waterfall-tag.dare {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.waterfall-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.waterfall-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 4px 10px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.add-btn {
    background: #e8f8f0;
    color: #52c41a;
}

.add-btn:hover {
    background: #52c41a;
    color: #fff;
}

.edit-btn {
    background: #e8f0fe;
    color: #667eea;
}

.edit-btn:hover {
    background: #667eea;
    color: #fff;
}

.delete-btn {
    background: #fde8e8;
    color: #f5576c;
}

.delete-btn:hover {
    background: #f5576c;
    color: #fff;
}

.waterfall-text {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    word-break: break-word;
}

.bank-footer {
    padding: 12px 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.password-type {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    width: auto;
    margin: 0;
}

.password-hint {
    font-size: 14px;
    color: #999;
}

.voice-title {
    font-size: 18px;
    color: #333;
    margin: 0;
}

.voice-list {
    padding: 0;
}

.voice-category {
    margin-bottom: 20px;
}

.voice-category-name {
    font-size: 16px;
    color: #667eea;
    margin-bottom: 10px;
    padding-left: 5px;
    border-left: 3px solid #667eea;
}

.voice-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.voice-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.voice-item:hover {
    background: #f0f7ff;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
}

.voice-item.playing {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.voice-item.playing .voice-icon {
    background: #fff;
    color: #667eea;
}

.voice-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.voice-name {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    word-break: break-word;
}

.voice-item.playing .voice-name {
    color: #fff;
}

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2000;
    animation: toastIn 0.3s ease;
}

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

.toast.success {
    border-left: 4px solid #52c41a;
}

.toast.error {
    border-left: 4px solid #f5576c;
}

.toast.warning {
    border-left: 4px solid #faad14;
}

.toast.info {
    border-left: 4px solid #667eea;
}

.toast-icon {
    font-size: 16px;
    font-weight: bold;
}

.toast.success .toast-icon {
    color: #52c41a;
}

.toast.error .toast-icon {
    color: #f5576c;
}

.toast.warning .toast-icon {
    color: #faad14;
}

.toast.info .toast-icon {
    color: #667eea;
}

.toast-message {
    font-size: 14px;
    color: #333;
}

.confirm-modal .modal-content {
    max-width: 300px;
    text-align: center;
}

.confirm-message {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
    padding: 10px 0;
}

@media (max-width: 600px) {
    .waterfall {
        column-count: 1;
    }

    .bank-filter {
        flex-direction: column;
        gap: 10px;
    }

    .bank-header {
        gap: 10px;
        display: flex;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
    }

    .bank-content {
        position: relative;
        height: 85vh;
    }
}