/* Reset und Basis-Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4285f4;
    --primary-hover: #357ae8;
    --success-color: #34a853;
    --error-color: #ea4335;
    --warning-color: #fbbc04;
    --text-dark: #202124;
    --text-light: #5f6368;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #dadce0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Header */
header {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 40px 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    font-size: 48px;
    color: var(--primary-color);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

header h1 {
    font-size: 2.5em;
    color: var(--text-dark);
    font-weight: 700;
}

.subtitle {
    color: var(--text-light);
    font-size: 1.1em;
}

/* Main Content */
main {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
}

/* Input Section */
.input-section {
    margin-bottom: 40px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-wrapper {
    display: flex;
    gap: 12px;
}

#urlInput {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    transition: var(--transition);
}

#urlInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.hint {
    color: var(--text-light);
    font-size: 0.9em;
    margin-top: -4px;
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-export {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
    transition: var(--transition);
}

.btn-export:hover {
    background: #2d8e47;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.5em;
    cursor: pointer;
    padding: 4px 8px;
    transition: var(--transition);
}

.btn-close:hover {
    color: var(--error-color);
}

/* Loading Section */
.loading-section {
    text-align: center;
    padding: 40px;
}

.loader {
    border: 4px solid var(--bg-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Result Section */
.result-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

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

.result-header h2 {
    color: var(--text-dark);
    font-size: 1.8em;
}

.result-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Status Card */
.status-card {
    padding: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 1.1em;
    font-weight: 600;
}

.status-card.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid var(--success-color);
}

.status-card.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid var(--error-color);
}

.status-card i {
    font-size: 2em;
}

/* Details Card */
.details-card {
    background: var(--bg-light);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.details-card h3 {
    color: var(--text-dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#gtmInfo {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gtm-item {
    background: var(--bg-white);
    padding: 16px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.gtm-item strong {
    color: var(--text-dark);
    display: block;
    margin-bottom: 4px;
}

.gtm-item code {
    background: #f1f3f4;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #d14;
}

/* Export Section */
.export-section {
    text-align: center;
    padding: 20px;
}

/* Info Section */
.info-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid var(--border-color);
}

.info-section h3 {
    text-align: center;
    color: var(--text-dark);
    font-size: 1.8em;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.info-card {
    text-align: center;
    padding: 24px;
    background: var(--bg-light);
    border-radius: 12px;
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.info-card i {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.info-card h4 {
    color: var(--text-dark);
    font-size: 1.2em;
    margin-bottom: 12px;
}

.info-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: white;
}

footer a {
    color: white;
    text-decoration: underline;
}

footer a:hover {
    opacity: 0.8;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header {
        padding: 30px 20px;
    }

    header h1 {
        font-size: 1.8em;
    }

    main {
        padding: 24px 20px;
    }

    .input-wrapper {
        flex-direction: column;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .result-header h2 {
        font-size: 1.4em;
    }
}
