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

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: 20px;
    color: #333;
}

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

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 30px 0;
}

header h1 {
    font-size: 48px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    cursor: default;
}

header p {
    font-size: 18px;
    opacity: 0.9;
    cursor: default;
}

.add-link-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.add-link-section h2 {
    margin-bottom: 25px;
    color: #667eea;
    font-size: 24px;
    cursor: default;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    cursor: default;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    cursor: text;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group select {
    cursor: pointer;
    background-color: white;
    appearance: none;
    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='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 12px;
    cursor: default;
}

.form-group input[type="file"] {
    padding: 10px;
    border: 2px dashed #e0e0e0;
    background: #f9f9f9;
    cursor: pointer;
}

.form-group input[type="file"]:hover {
    border-color: #667eea;
    background: #f0f0ff;
}

.image-preview-container {
    margin-top: 10px;
}

.image-preview-container img {
    border: 2px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.recent-urls {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recent-url-tag {
    display: inline-block;
    padding: 6px 12px;
    background: #f0f0ff;
    border: 1px solid #667eea;
    border-radius: 20px;
    font-size: 12px;
    color: #667eea;
    cursor: pointer;
    transition: all 0.2s ease;
}

.recent-url-tag:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

.recent-url-tag:active {
    transform: translateY(0);
}

/* Modern Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10000;
    animation: slideInRight 0.4s ease-out, fadeOut 0.4s ease-in 2.6s;
    min-width: 300px;
}

.toast.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 10px 40px rgba(56, 239, 125, 0.4);
}

.toast.error {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    box-shadow: 0 10px 40px rgba(235, 51, 73, 0.4);
}

.toast-icon {
    font-size: 24px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 14px;
    opacity: 0.95;
    line-height: 1.4;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(400px);
    }
}

@media (max-width: 480px) {
    .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        padding: 16px 20px;
    }
    
    .toast-title {
        font-size: 15px;
    }
    
    .toast-message {
        font-size: 13px;
    }
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-copy {
    background: #4CAF50;
    color: white;
    padding: 8px 16px;
    font-size: 12px;
}

.btn-copy:hover {
    background: #45a049;
}

.btn-edit {
    background: #2196F3;
    color: white;
}

.btn-edit:hover {
    background: #0b7dda;
}

.btn-delete {
    background: #f44336;
    color: white;
}

.btn-delete:hover {
    background: #da190b;
}

.links-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.links-section h2 {
    margin-bottom: 25px;
    color: #667eea;
    font-size: 24px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.link-card {
    padding: 0;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    overflow: hidden;
    background: white;
}

.link-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.link-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.link-id-badge {
    font-weight: 700;
    font-size: 16px;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.link-stats-mini {
    display: flex;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
}

.stat-icon {
    font-size: 16px;
}

.stat-value {
    font-weight: 600;
    font-size: 15px;
}

.link-main {
    padding: 20px;
}

.link-target, .safelink-url {
    margin-bottom: 15px;
}

.link-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.link-url {
    display: block;
    color: #667eea;
    text-decoration: none;
    word-break: break-all;
    font-size: 14px;
    transition: color 0.3s ease;
    cursor: pointer;
}

.link-url:hover {
    color: #764ba2;
    text-decoration: underline;
}

.url-copy-group {
    display: flex;
    gap: 10px;
}

.copy-input {
    flex: 1;
    padding: 10px 12px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px;
    font-size: 13px;
    background: #f8f9fa;
    font-family: 'Courier New', monospace;
}

.link-analytics {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.analytics-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 10px;
}

.analytics-row:last-child {
    margin-bottom: 0;
}

.analytics-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.analytics-label {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.analytics-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.analytics-value.highlight {
    color: #667eea;
    font-size: 18px;
}

.link-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    background: white;
}

.link-actions .btn {
    min-width: 80px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover,
.close:focus {
    color: #000;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 32px;
    }

    .link-card {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .link-preview {
        width: 100%;
        height: 200px;
    }

    .link-actions {
        flex-direction: row;
    }

    .link-actions .btn {
        flex: 1;
    }

    .safelink-url {
        flex-direction: column;
        align-items: stretch;
    }
}
