* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

header h1 i {
    font-size: 28px;
}

.add-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.add-section textarea {
    flex: 1;
    min-width: 200px;
    min-height: 80px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: monospace;
    resize: vertical;
    transition: border-color 0.3s;
}

.add-section textarea:focus {
    outline: none;
    border-color: #667eea;
}

.add-section .datetime-input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background-color: white;
    transition: border-color 0.3s;
}

.add-section .datetime-input:focus {
    outline: none;
    border-color: #667eea;
}

.add-section select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.add-section select:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background-color: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background-color: #d0d0d0;
}

.filter-section {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    background-color: white;
    cursor: pointer;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
}

.list-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow: hidden;
}

.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: #999;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}

.empty-state p {
    font-size: 16px;
}

#stringList {
    list-style: none;
}

.string-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.string-item:hover {
    background-color: #fafafa;
}

.string-item:last-child {
    border-bottom: none;
}

.string-content {
    flex: 1;
    font-family: monospace;
    font-size: 14px;
    color: #333;
    word-break: break-all;
    padding-right: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    line-height: 1.5;
    max-height: 1.5em;
}

.string-content.expanded {
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    max-height: none;
    overflow: visible;
    text-overflow: unset;
    /* white-space: pre-wrap; */
}

.string-content-container {
    flex: 1;
    padding-right: 15px;
}

.expand-btn {
    background: none;
    border: none;
    color: #667eea;
    font-size: 12px;
    cursor: pointer;
    padding: 5px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
}

.expand-btn:hover {
    color: #764ba2;
}

.string-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
    color: #666;
    margin-right: 15px;
    min-width: 120px;
}

.string-meta div {
    display: flex;
    align-items: center;
    gap: 4px;
}

.string-meta i {
    font-size: 11px;
}

.string-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.action-btn.copy {
    background-color: #e3f2fd;
    color: #1976d2;
}

.action-btn.copy:hover {
    background-color: #bbdefb;
}

.action-btn.used {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.action-btn.used:hover {
    background-color: #c8e6c9;
}

.action-btn.unused {
    background-color: #fff3e0;
    color: #f57c00;
}

.action-btn.unused:hover {
    background-color: #ffe0b2;
}

.action-btn.delete {
    background-color: #ffebee;
    color: #c62828;
}

.action-btn.delete:hover {
    background-color: #ffcdd2;
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.status-badge.used {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-badge.unused {
    background-color: #fff3e0;
    color: #f57c00;
}

.status-badge.expired {
    background-color: #ffebee;
    color: #c62828;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    font-size: 16px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 5px;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .add-section {
        flex-direction: column;
    }

    .add-section input,
    .add-section select,
    .add-section button {
        width: 100%;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }

    .string-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .string-content {
        padding-right: 0;
    }

    .string-meta {
        flex-direction: row;
        flex-wrap: wrap;
        min-width: auto;
        margin-right: 0;
    }

    .string-actions {
        flex-direction: row;
        width: 100%;
        justify-content: flex-start;
    }

    .action-btn {
        flex: 1;
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 20px;
    }

    .string-meta {
        flex-direction: column;
        gap: 3px;
    }

    .string-actions {
        flex-wrap: wrap;
    }

    .action-btn {
        flex: none;
        min-width: auto;
    }
}